From e3b9eca08f2d113a983ccc4f4f33f8680eec0ce1 Mon Sep 17 00:00:00 2001 From: nicolas Date: Sun, 24 Oct 2010 19:48:22 +0000 Subject: [PATCH] P1 cubic BC-spline coefficient (always equal to zero) removed from coeff --- ChangeLog | 1 + Magick++/bin/Magick++-config | 2 +- PerlMagick/Makefile.PL | 6 +-- config/configure.xml | 6 +-- config/type-dejavu.xml | 84 ++++++++++++++++++------------------ config/type-ghostscript.xml | 68 ++++++++++++++--------------- config/type.xml | 2 +- libtool | 28 ++++++------ magick/Magick-config | 2 +- magick/magick-config.h | 34 +++++++++++---- magick/resize.c | 38 ++++++++-------- magick/version.h | 2 +- wand/Wand-config | 2 +- 13 files changed, 145 insertions(+), 130 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9531729e8..f54715b0f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 2010-10-24 6.6.5-1 Nicolas Robidoux * Simplified CubicBC formulas. + * P1 coefficient (always zero) removed from coeff. 2010-10-22 6.6.5-1 Nicolas Robidoux * Revert the Robidoux filter to a Keys cubic with C=(108 sqrt 2-29)/398 diff --git a/Magick++/bin/Magick++-config b/Magick++/bin/Magick++-config index cca65e9df..2e23e4067 100755 --- a/Magick++/bin/Magick++-config +++ b/Magick++/bin/Magick++-config @@ -55,7 +55,7 @@ while test $# -gt 0; do echo '-L/usr/local/lib ' ;; --libs) - echo "-L${libdir} -lMagick++ -lMagickWand -lMagickCore -ltiff -lfreetype -ljasper -ljpeg -lpng -lfontconfig -lXext -lXt -lSM -lICE -lX11 -lbz2 -lxml2 -lz -lm -lgomp -lpthread -lltdl" + echo "-L${libdir} -lMagick++ -lMagickWand -lMagickCore -llcms -ltiff -lfreetype -ljasper -ljpeg -lpng -ldjvulibre -lfftw3 -lfontconfig -lwmf -lwmflite -lXext -lXt -lSM -lICE -lX11 -lbz2 -pthread -lIlmImf -lz -lImath -lHalf -lIex -lIlmThread -pthread -lrsvg-2 -lgdk_pixbuf-2.0 -lm -lcairo -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lxml2 -lgvc -lgraph -lcdt -lz -lm -lgomp -lpthread -lltdl" ;; *) echo "${usage}" 1>&2 diff --git a/PerlMagick/Makefile.PL b/PerlMagick/Makefile.PL index 1a9b06508..909df45eb 100644 --- a/PerlMagick/Makefile.PL +++ b/PerlMagick/Makefile.PL @@ -156,9 +156,9 @@ foreach my $delegate (@tested_delegates) { } # defaults for LIBS & INC & CCFLAGS params that we later pass to Writemakefile -my $INC_magick = '-I../ -I.. -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/freetype2 -I/usr/include/libxml2 -I"' . $Config{'usrinc'} . '/ImageMagick"'; +my $INC_magick = '-I../ -I.. -D_REENTRANT -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -pthread -D_REENTRANT -I/usr/include/librsvg-2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -I/usr/include/graphviz -I/usr/include/freetype2 -I/usr/include/libxml2 -I"' . $Config{'usrinc'} . '/ImageMagick"'; my $LIBS_magick = '-L../magick/.libs -lMagickCore -lperl -lm'; -my $CCFLAGS_magick = "$Config{'ccflags'} -fopenmp -g -O2 -Wall -pthread"; +my $CCFLAGS_magick = "$Config{'ccflags'} -pthread -I/usr/include/OpenEXR -fopenmp -g -O2 -Wall -pthread"; my $LDFLAGS_magick = "-L../magick/.libs -lMagickCore $Config{'ldflags'} "; my $LDDLFLAGS_magick = "-L../magick/.libs -lMagickCore $Config{'lddlflags'} "; @@ -201,7 +201,7 @@ WriteMakefile #'CC' => 'gcc -std=gnu99 -std=gnu99', # C pre-processor flags (e.g. -I & -D options) - # 'CPPFLAGS' => "$Config{'cppflags'} -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/freetype2 -I/usr/include/libxml2", + # 'CPPFLAGS' => "$Config{'cppflags'} -D_REENTRANT -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -pthread -D_REENTRANT -I/usr/include/librsvg-2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -I/usr/include/graphviz -I/usr/include/freetype2 -I/usr/include/libxml2", # C compiler flags (e.g. -O -g) 'CCFLAGS' => $CCFLAGS_magick, diff --git a/config/configure.xml b/config/configure.xml index d5aebb245..9f07ae2b2 100644 --- a/config/configure.xml +++ b/config/configure.xml @@ -15,18 +15,18 @@ - + - + - + diff --git a/config/type-dejavu.xml b/config/type-dejavu.xml index 88c0d7224..0db1fc8e9 100644 --- a/config/type-dejavu.xml +++ b/config/type-dejavu.xml @@ -17,46 +17,46 @@ ]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/type-ghostscript.xml b/config/type-ghostscript.xml index 0f5beb90f..d8d554b97 100644 --- a/config/type-ghostscript.xml +++ b/config/type-ghostscript.xml @@ -17,38 +17,38 @@ ]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/type.xml b/config/type.xml index 96866bf8f..ccf5d65dc 100644 --- a/config/type.xml +++ b/config/type.xml @@ -17,5 +17,5 @@ ]> - + diff --git a/libtool b/libtool index f7834324c..f00b23767 100755 --- a/libtool +++ b/libtool @@ -1,8 +1,8 @@ -#! /bin/sh +#! /bin/bash # libtool - Provide generalized library-building support services. # Generated automatically by config.status (ImageMagick) 6.6.5-3 -# Libtool was configured on host magick.imagemagick.org: +# Libtool was configured on host nicolas-laptop: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, @@ -95,7 +95,7 @@ NM="/usr/bin/nm -B" LN_S="ln -s" # What is the maximum length of a command? -max_cmd_len=1966080 +max_cmd_len=1572864 # Object file suffix (normally "o"). objext=o @@ -138,7 +138,7 @@ old_postuninstall_cmds="" LTCC="gcc -std=gnu99 -std=gnu99" # LTCC compiler flags. -LTCFLAGS="-fopenmp -g -O2 -Wall -pthread" +LTCFLAGS="-pthread -I/usr/include/OpenEXR -fopenmp -g -O2 -Wall -pthread" # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'" @@ -156,7 +156,7 @@ global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\ objdir=.libs # Shell to use when invoking shell scripts. -SHELL="/bin/sh" +SHELL="/bin/bash" # An echo program that does not interpret backslashes. ECHO="echo" @@ -240,10 +240,10 @@ finish_eval="" hardcode_into_libs=yes # Compile-time system search path for libraries. -sys_lib_search_path_spec="/usr/lib/gcc/x86_64-redhat-linux/4.4.4 /usr/lib64 /lib64" +sys_lib_search_path_spec="/usr/lib/gcc/x86_64-linux-gnu/4.4.3 /usr/lib /lib /usr/lib/x86_64-linux-gnu" # Run-time system search path for libraries. -sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib /usr/lib64/atlas /usr/lib64/mysql /usr/lib64/qt-3.3/lib /usr/lib/wine/ /usr/lib64/wine/ /usr/lib64/xulrunner-1.9.2 " +sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib /usr/lib/mesa /usr/lib32/mesa /usr/lib32/alsa-lib /usr/lib/alsa-lib /usr/local/lib /lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu " # Whether dlopen is supported. dlopen_support=yes @@ -252,7 +252,7 @@ dlopen_support=yes dlopen_self=yes # Whether dlopen of statically linked programs is supported. -dlopen_self_static=yes +dlopen_self_static=no # Commands to strip libraries. old_striplib="strip --strip-debug" @@ -281,7 +281,7 @@ wl="-Wl," pic_flag=" -fPIC -DPIC" # Compiler flag to prevent dynamic linking. -link_static_flag="" +link_static_flag="-static" # Does compiler simultaneously support -c and -o options? compiler_c_o="yes" @@ -8936,7 +8936,7 @@ wl="-Wl," pic_flag=" -fPIC -DPIC" # Compiler flag to prevent dynamic linking. -link_static_flag="" +link_static_flag="-static" # Does compiler simultaneously support -c and -o options? compiler_c_o="yes" @@ -9046,17 +9046,17 @@ file_list_spec="" hardcode_action=immediate # The directories searched by this compiler when creating a shared library. -compiler_lib_search_dirs="/usr/lib/gcc/x86_64-redhat-linux/4.4.4 /usr/lib/gcc/x86_64-redhat-linux/4.4.4 /usr/lib/gcc/x86_64-redhat-linux/4.4.4/../../../../lib64 /lib/../lib64 /usr/lib/../lib64 /usr/lib/gcc/x86_64-redhat-linux/4.4.4/../../.." +compiler_lib_search_dirs="/usr/lib/gcc/x86_64-linux-gnu/4.4.3 /usr/lib/gcc/x86_64-linux-gnu/4.4.3 /usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib /lib/../lib /usr/lib/../lib /usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../.. /usr/lib/x86_64-linux-gnu" # Dependencies to place before and after the objects being linked to # create a shared library. -predep_objects="/usr/lib/gcc/x86_64-redhat-linux/4.4.4/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.4.4/crtbeginS.o" -postdep_objects="/usr/lib/gcc/x86_64-redhat-linux/4.4.4/crtendS.o /usr/lib/gcc/x86_64-redhat-linux/4.4.4/../../../../lib64/crtn.o" +predep_objects="/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.4.3/crtbeginS.o" +postdep_objects="/usr/lib/gcc/x86_64-linux-gnu/4.4.3/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/crtn.o" predeps="" postdeps="-lstdc++ -lm -lgomp -lgcc_s -lpthread -lc -lgcc_s" # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path="-L/usr/lib/gcc/x86_64-redhat-linux/4.4.4 -L/usr/lib/gcc/x86_64-redhat-linux/4.4.4 -L/usr/lib/gcc/x86_64-redhat-linux/4.4.4/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.4.4/../../.." +compiler_lib_search_path="-L/usr/lib/gcc/x86_64-linux-gnu/4.4.3 -L/usr/lib/gcc/x86_64-linux-gnu/4.4.3 -L/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../.. -L/usr/lib/x86_64-linux-gnu" # ### END LIBTOOL TAG CONFIG: CXX diff --git a/magick/Magick-config b/magick/Magick-config index b121c9762..971e6e37c 100755 --- a/magick/Magick-config +++ b/magick/Magick-config @@ -52,7 +52,7 @@ while test $# -gt 0; do echo '-L/usr/local/lib ' ;; --libs) - echo "-L${libdir} -lMagickCore -ltiff -lfreetype -ljasper -ljpeg -lpng -lfontconfig -lXext -lXt -lSM -lICE -lX11 -lbz2 -lxml2 -lz -lm -lgomp -lpthread -lltdl" + echo "-L${libdir} -lMagickCore -llcms -ltiff -lfreetype -ljasper -ljpeg -lpng -ldjvulibre -lfftw3 -lfontconfig -lwmf -lwmflite -lXext -lXt -lSM -lICE -lX11 -lbz2 -pthread -lIlmImf -lz -lImath -lHalf -lIex -lIlmThread -pthread -lrsvg-2 -lgdk_pixbuf-2.0 -lm -lcairo -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lxml2 -lgvc -lgraph -lcdt -lz -lm -lgomp -lpthread -lltdl" ;; *) echo "${usage}" 1>&2 diff --git a/magick/magick-config.h b/magick/magick-config.h index 6a5282659..0a55e87ca 100644 --- a/magick/magick-config.h +++ b/magick/magick-config.h @@ -54,7 +54,9 @@ #endif /* Define if you have DJVU library */ -/* #undef DJVU_DELEGATE */ +#ifndef MAGICKCORE_DJVU_DELEGATE +#define MAGICKCORE_DJVU_DELEGATE 1 +#endif /* Directory where ImageMagick documents live. */ #ifndef MAGICKCORE_DOCUMENTATION_PATH @@ -76,7 +78,9 @@ #endif /* Define if you have FFTW library */ -/* #undef FFTW_DELEGATE */ +#ifndef MAGICKCORE_FFTW_DELEGATE +#define MAGICKCORE_FFTW_DELEGATE 1 +#endif /* Location of filter modules */ #ifndef MAGICKCORE_FILTER_PATH @@ -105,7 +109,9 @@ /* #undef GS_DELEGATE */ /* Define if you have GVC library */ -/* #undef GVC_DELEGATE */ +#ifndef MAGICKCORE_GVC_DELEGATE +#define MAGICKCORE_GVC_DELEGATE 1 +#endif /* Define to 1 if you have the `argz_add' function. */ #ifndef MAGICKCORE_HAVE_ARGZ_ADD @@ -394,7 +400,9 @@ /* #undef HAVE_LCMS2_LCMS2_H */ /* Define if you have the header file. */ -/* #undef HAVE_LCMS_H */ +#ifndef MAGICKCORE_HAVE_LCMS_H +#define MAGICKCORE_HAVE_LCMS_H 1 +#endif /* Define if you have the header file. */ /* #undef HAVE_LCMS_LCMS_H */ @@ -1069,7 +1077,9 @@ #endif /* Define if you have LCMS (v1.11 or later) library */ -/* #undef LCMS_DELEGATE */ +#ifndef MAGICKCORE_LCMS_DELEGATE +#define MAGICKCORE_LCMS_DELEGATE 1 +#endif /* Directory where architecture-dependent files live. */ #ifndef MAGICKCORE_LIBRARY_PATH @@ -1095,7 +1105,7 @@ /* Define to the system default library search path. */ #ifndef MAGICKCORE_LT_DLSEARCH_PATH -#define MAGICKCORE_LT_DLSEARCH_PATH "/lib64:/usr/lib64:/lib:/usr/lib:/usr/lib64/atlas:/usr/lib64/mysql:/usr/lib64/qt-3.3/lib:/usr/lib/wine/:/usr/lib64/wine/:/usr/lib64/xulrunner-1.9.2" +#define MAGICKCORE_LT_DLSEARCH_PATH "/lib64:/usr/lib64:/lib:/usr/lib:/usr/lib/mesa:/usr/lib32/mesa:/usr/lib32/alsa-lib:/usr/lib/alsa-lib:/usr/local/lib:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu" #endif /* The archive extension */ @@ -1136,7 +1146,9 @@ /* #undef NO_MINUS_C_MINUS_O */ /* Define if you have OPENEXR library */ -/* #undef OPENEXR_DELEGATE */ +#ifndef MAGICKCORE_OPENEXR_DELEGATE +#define MAGICKCORE_OPENEXR_DELEGATE 1 +#endif /* Define to the address where bug reports for this package should be sent. */ #ifndef MAGICKCORE_PACKAGE_BUGREPORT @@ -1191,7 +1203,9 @@ #endif /* Define if you have RSVG library */ -/* #undef RSVG_DELEGATE */ +#ifndef MAGICKCORE_RSVG_DELEGATE +#define MAGICKCORE_RSVG_DELEGATE 1 +#endif /* Define to the type of arg 1 for `select'. */ #ifndef MAGICKCORE_SELECT_TYPE_ARG1 @@ -1339,7 +1353,9 @@ /* #undef WITH_DMALLOC */ /* Define if you have WMF library */ -/* #undef WMF_DELEGATE */ +#ifndef MAGICKCORE_WMF_DELEGATE +#define MAGICKCORE_WMF_DELEGATE 1 +#endif /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ diff --git a/magick/resize.c b/magick/resize.c index 42b3699f9..16c7b976c 100644 --- a/magick/resize.c +++ b/magick/resize.c @@ -85,7 +85,7 @@ struct _ResizeFilter window_support, /* window support, usally equal to support (expert only) */ scale, /* dimension scaling to fit window support (usally 1.0) */ blur, /* x-scale (blur-sharpen) */ - coeff[8]; /* cubic coefficents for smooth Cubic filters */ + coeff[7]; /* cubic coefficents for BC-cubic spline filters */ size_t signature; @@ -195,10 +195,10 @@ static MagickRealType CubicBC(const MagickRealType x, { /* Cubic Filters using B,C determined values: - Mitchell-Netravali B=1/3 C=1/3 Qualitively ideal Cubic Filter - Catmull-Rom B= 0 C=1/2 Cublic Interpolation Function - Cubic B-Spline B= 1 C= 0 Spline Approximation of Gaussian - Hermite B= 0 C= 0 Quadratic Spline (support = 1) + Mitchell-Netravali B= 1/3 C= 1/3 "Balanced" cubic spline filter + Catmull-Rom B= 0 C= 1/2 Interpolatory and exact on linears + Cubic B-Spline B= 1 C= 0 Spline approximation of Gaussian + Hermite B= 0 C= 0 Spline with small support (= 1) See paper by Mitchell and Netravali, Reconstruction Filters in Computer Graphics Computer Graphics, Volume 22, Number 4, August 1988 @@ -218,19 +218,18 @@ static MagickRealType CubicBC(const MagickRealType x, which are used to define the filter: P0 + P1*x + P2*x^2 + P3*x^3 0 <= x < 1 - Q0 + Q1*x + Q2*x^2 + Q3*x^3 1 <= x <= 2 + Q0 + Q1*x + Q2*x^2 + Q3*x^3 1 <= x < 2 - which ensures function is continuous in value and derivative (slope). - - (This implies that coeff[1] is always zero. It is omitted in the - computation below.) + which ensures function is continuous in value and derivative + (slope). This implies that P1 is always zero; for this reason, it + is skipped. */ if (x < 1.0) return(resize_filter->coeff[0]+x*(x* - (resize_filter->coeff[2]+x*resize_filter->coeff[3]))); + (resize_filter->coeff[1]+x*resize_filter->coeff[2]))); if (x < 2.0) - return(resize_filter->coeff[4]+x*(resize_filter->coeff[5]+x* - (resize_filter->coeff[6]+x*resize_filter->coeff[7]))); + return(resize_filter->coeff[3]+x*(resize_filter->coeff[4]+x* + (resize_filter->coeff[5]+x*resize_filter->coeff[6]))); return(0.0); } @@ -1042,13 +1041,12 @@ MagickExport ResizeFilter *AcquireResizeFilter(const Image *image, { const double twoB = B+B; resize_filter->coeff[0]=1.0-(1.0/3.0)*B; - resize_filter->coeff[1]=0.0; - resize_filter->coeff[2]=-3.0+twoB+C; - resize_filter->coeff[3]=2.0-1.5*B-C; - resize_filter->coeff[4]=(4.0/3.0)*B+4.0*C; - resize_filter->coeff[5]=-8.0*C-twoB; - resize_filter->coeff[6]=B+5.0*C; - resize_filter->coeff[7]=(-1.0/6.0)*B-C; + resize_filter->coeff[1]=-3.0+twoB+C; + resize_filter->coeff[2]=2.0-1.5*B-C; + resize_filter->coeff[3]=(4.0/3.0)*B+4.0*C; + resize_filter->coeff[4]=-8.0*C-twoB; + resize_filter->coeff[5]=B+5.0*C; + resize_filter->coeff[6]=(-1.0/6.0)*B-C; } } diff --git a/magick/version.h b/magick/version.h index 0e3467db3..98fd5404d 100644 --- a/magick/version.h +++ b/magick/version.h @@ -34,7 +34,7 @@ extern "C" { #define MagickLibInterface 4 #define MagickLibMinInterface 4 #define MagickReleaseDate "2010-10-24" -#define MagickChangeDate "20101022" +#define MagickChangeDate "20101024" #define MagickAuthoritativeURL "http://www.imagemagick.org" #if defined(MAGICKCORE_OPENMP_SUPPORT) #define MagickOpenMPFeature "OpenMP " diff --git a/wand/Wand-config b/wand/Wand-config index 4778ec58f..4da6f47c5 100755 --- a/wand/Wand-config +++ b/wand/Wand-config @@ -52,7 +52,7 @@ while test $# -gt 0; do echo '-L/usr/local/lib ' ;; --libs) - echo "-L${libdir} -lMagickWand -lMagickCore -ltiff -lfreetype -ljasper -ljpeg -lpng -lfontconfig -lXext -lXt -lSM -lICE -lX11 -lbz2 -lxml2 -lz -lm -lgomp -lpthread -lltdl" + echo "-L${libdir} -lMagickWand -lMagickCore -llcms -ltiff -lfreetype -ljasper -ljpeg -lpng -ldjvulibre -lfftw3 -lfontconfig -lwmf -lwmflite -lXext -lXt -lSM -lICE -lX11 -lbz2 -pthread -lIlmImf -lz -lImath -lHalf -lIex -lIlmThread -pthread -lrsvg-2 -lgdk_pixbuf-2.0 -lm -lcairo -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lxml2 -lgvc -lgraph -lcdt -lz -lm -lgomp -lpthread -lltdl" ;; *) echo "${usage}" 1>&2 -- 2.50.1