Skip to content

Commit 69fcf1b

Browse files
authored
Merge branch 'master' into add-openjpeg
2 parents 595f5a1 + 9cbb4c2 commit 69fcf1b

33 files changed

+3166
-1865
lines changed

ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
- fix issue thumbnailing RGBA images in linear mode [jjonesrs]
3535
- improve vipsthumbnail profile handling
3636
- fix tiff deflate predictor setting [Adios]
37+
- fix vector path for composite on i386 [kleisauke]
3738

3839
18/12/20 started 8.10.5
3940
- fix potential /0 in animated webp load [lovell]

README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,13 @@ Debug build:
116116
make
117117
make install
118118

119+
# Built-in loaders
120+
121+
libvips has a number of built-in loaders and savers. You can disable these if
122+
you wish, for example:
123+
124+
./configure --prefix=/Users/john/vips --without-nsgif --without-ppm
125+
119126
# Dependencies
120127

121128
libvips has to have `libglib2.0-dev` and `libexpat1-dev`. Other dependencies
@@ -128,14 +135,14 @@ libraries automatically. See `./configure --help` for a set of flags to
128135
control library detection. Packages are generally found with `pkg-config`,
129136
so make sure that is working.
130137

131-
Libraries like giflib and nifti do not use `pkg-config` so libvips will also
138+
Libraries like nifti do not use `pkg-config` so libvips will also
132139
look for them in the default path and in `$prefix`. If you have installed
133140
your own versions of these libraries in a different location, libvips will
134141
not see them. Use switches to libvips configure like:
135142

136143
./configure --prefix=/Users/john/vips \
137-
--with-giflib-includes=/opt/local/include \
138-
--with-giflib-libraries=/opt/local/lib
144+
--with-nifti-includes=/opt/local/include \
145+
--with-nifti-libraries=/opt/local/lib
139146

140147
or perhaps:
141148

@@ -151,11 +158,6 @@ The IJG JPEG library. Use the `-turbo` version if you can.
151158

152159
If available, libvips adds support for EXIF metadata in JPEG files.
153160

154-
### giflib
155-
156-
The standard gif loader. If this is not present, vips will try to load gifs
157-
via imagemagick instead.
158-
159161
### librsvg
160162

161163
The usual SVG loader. If this is not present, vips will try to load SVGs

configure.ac

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ AC_PROG_CC_STDC
190190
AC_PROG_CXX
191191
AC_PROG_INSTALL
192192
AC_PROG_LN_S
193-
AM_WITH_DMALLOC
194193

195194
AC_ARG_WITH([doxygen],
196195
AS_HELP_STRING([--without-doxygen], [build without doxygen (default: test)]))
@@ -257,7 +256,7 @@ AM_GLIB_GNU_GETTEXT
257256
# [ax_gcc_version_option=yes],
258257
# [ax_gcc_version_option=no]
259258
# )
260-
AC_MSG_CHECKING([for gcc version])
259+
AC_MSG_CHECKING([for $CC version])
261260
GCC_VERSION=""
262261
version=$($CC -dumpversion)
263262
if test $? = 0; then
@@ -311,7 +310,7 @@ AC_TYPE_SIZE_T
311310

312311
# g++/gcc 4.x and 5.x have rather broken vector support ... 5.4.1 seems to
313312
# work, but 5.4.0 fails to even compile
314-
AC_MSG_CHECKING([for gcc with working vector support])
313+
AC_MSG_CHECKING([for $CC with working vector support])
315314
if test x"$GCC_VERSION_MAJOR" != x"4" -a x"$GCC_VERSION_MAJOR" != x"5"; then
316315
AC_MSG_RESULT([yes])
317316
else
@@ -324,7 +323,7 @@ if test x"$ax_cv_have_var_attribute_vector_size" = x"yes"; then
324323
AC_MSG_CHECKING([for C++ vector shuffle])
325324
AC_LANG_PUSH([C++])
326325
AC_TRY_COMPILE([
327-
typedef float v4f __attribute__((vector_size(4 * sizeof(float))));
326+
typedef float v4f __attribute__((vector_size(4 * sizeof(float)),aligned(16)));
328327
],[
329328
v4f f; f[3] = 99;
330329
],[
@@ -347,7 +346,7 @@ if test x"$have_vector_shuffle" = x"yes"; then
347346
AC_MSG_CHECKING([for C++ vector arithmetic])
348347
AC_LANG_PUSH([C++])
349348
AC_TRY_COMPILE([
350-
typedef float v4f __attribute__((vector_size(4 * sizeof(float))));
349+
typedef float v4f __attribute__((vector_size(4 * sizeof(float)),aligned(16)));
351350
],[
352351
v4f f = {1, 2, 3, 4}; f *= 12.0;
353352
v4f g = {5, 6, 7, 8}; f = g > 0 ? g : -1 * g;
@@ -367,7 +366,7 @@ if test x"$have_vector_arith" = x"yes"; then
367366
AC_MSG_CHECKING([for C++ signed constants in vector templates])
368367
AC_LANG_PUSH([C++])
369368
AC_TRY_COMPILE([
370-
typedef float v4f __attribute__((vector_size(4 * sizeof(float))));
369+
typedef float v4f __attribute__((vector_size(4 * sizeof(float)),aligned(16)));
371370
template <typename T>
372371
static void
373372
h( v4f B )
@@ -394,7 +393,7 @@ fi
394393
AC_FUNC_MEMCMP
395394
AC_FUNC_MMAP
396395
AC_FUNC_VPRINTF
397-
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])
396+
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 _aligned_malloc posix_memalign memalign])
398397
AC_CHECK_LIB(m,cbrt,[AC_DEFINE(HAVE_CBRT,1,[have cbrt() in libm.])])
399398
AC_CHECK_LIB(m,hypot,[AC_DEFINE(HAVE_HYPOT,1,[have hypot() in libm.])])
400399
AC_CHECK_LIB(m,atan2,[AC_DEFINE(HAVE_ATAN2,1,[have atan2() in libm.])])
@@ -1010,6 +1009,16 @@ VIPS_LIBS="$VIPS_LIBS $MATIO_LIBS"
10101009
# not external libraries, but have options to disable them, helps to
10111010
# reduce attack surface
10121011

1012+
AC_ARG_WITH([nsgif],
1013+
AS_HELP_STRING([--without-nsgif], [build without nsgif load (default: with)]))
1014+
1015+
if test x"$with_nsgif" != x"no"; then
1016+
AC_DEFINE(HAVE_NSGIF,1,[define to build nsgif load support.])
1017+
with_nsgif=yes
1018+
fi
1019+
1020+
AM_CONDITIONAL(ENABLE_NSGIF, [test x"$with_nsgif" = x"yes"])
1021+
10131022
AC_ARG_WITH([ppm],
10141023
AS_HELP_STRING([--without-ppm], [build without ppm (default: with)]))
10151024

@@ -1133,19 +1142,6 @@ VIPS_CFLAGS="$VIPS_CFLAGS $TIFF_CFLAGS"
11331142
VIPS_INCLUDES="$VIPS_INCLUDES $TIFF_INCLUDES"
11341143
VIPS_LIBS="$VIPS_LIBS $TIFF_LIBS"
11351144

1136-
# giflib
1137-
FIND_GIFLIB(
1138-
[with_giflib="yes (found by search)"
1139-
],
1140-
[AC_MSG_WARN([giflib not found; disabling direct GIF support])
1141-
with_giflib=no
1142-
]
1143-
)
1144-
1145-
VIPS_CFLAGS="$VIPS_CFLAGS $GIFLIB_CFLAGS"
1146-
VIPS_INCLUDES="$VIPS_INCLUDES $GIFLIB_INCLUDES"
1147-
VIPS_LIBS="$VIPS_LIBS $GIFLIB_LIBS"
1148-
11491145
# Look for libspng first
11501146
# 0.6.1 uses "libspng.pc", git master libspng uses "spng.pc"
11511147
AC_ARG_WITH([libspng],
@@ -1323,6 +1319,7 @@ gobject introspection: $found_introspection, \
13231319
RAD load/save: $with_radiance, \
13241320
Analyze7 load/save: $with_analyze, \
13251321
PPM load/save: $with_ppm, \
1322+
GIF load: $with_nsgif, \
13261323
generate C++ docs: $with_doxygen, \
13271324
use fftw3 for FFT: $with_fftw, \
13281325
accelerate loops with orc: $with_orc, \
@@ -1336,7 +1333,6 @@ PNG load/save with libpng: $with_png, \
13361333
8bpp PNG quantisation: $with_imagequant, \
13371334
TIFF load/save with libtiff: $with_tiff, \
13381335
image pyramid save: $with_gsf, \
1339-
GIF load with giflib: $with_giflib, \
13401336
HEIC/AVIF load/save with libheif: $with_heif, \
13411337
WebP load/save with libwebp: $with_libwebp, \
13421338
PDF load with PDFium: $with_pdfium, \
@@ -1381,6 +1377,7 @@ AC_CONFIG_FILES([
13811377
libvips/convolution/Makefile
13821378
libvips/deprecated/Makefile
13831379
libvips/foreign/Makefile
1380+
libvips/foreign/libnsgif/Makefile
13841381
libvips/freqfilt/Makefile
13851382
libvips/histogram/Makefile
13861383
libvips/draw/Makefile
@@ -1421,6 +1418,7 @@ gobject introspection: $found_introspection
14211418
RAD load/save: $with_radiance
14221419
Analyze7 load/save: $with_analyze
14231420
PPM load/save: $with_ppm
1421+
GIF load: $with_nsgif
14241422
generate C++ docs: $with_doxygen
14251423
14261424
## Optional dependencies
@@ -1443,7 +1441,6 @@ PNG load/save with libpng: $with_png
14431441
TIFF load/save with libtiff: $with_tiff
14441442
image pyramid save: $with_gsf
14451443
(requires libgsf-1 1.14.26 or later)
1446-
GIF load with giflib: $with_giflib
14471444
HEIC/AVIF load/save with libheif: $with_heif
14481445
WebP load/save with libwebp: $with_libwebp
14491446
(requires libwebp, libwebpmux, libwebpdemux 0.6.0 or later)

cplusplus/include/vips/Makefile.am

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ pkginclude_HEADERS = \
55
VConnection8.h \
66
vips8
77

8-
vips-operators.h:
9-
echo "// headers for vips operations" > vips-operators.h; \
10-
echo -n "// " >> vips-operators.h; \
11-
date >> vips-operators.h; \
12-
echo "// this file is generated automatically, do not edit!" >> vips-operators.h; \
13-
./../../gen-operators.py -g h >> vips-operators.h
8+
vips-operators:
9+
echo "// headers for vips operations" > vips-operators; \
10+
echo "// paste this file into VImage8.h, do not leave in repo" > vips-operators; \
11+
echo -n "// " >> vips-operators; \
12+
date >> vips-operators; \
13+
echo "// this file is generated automatically, do not edit!" >> vips-operators; \
14+
./../../gen-operators.py -g h >> vips-operators

cplusplus/include/vips/VImage8.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2983,7 +2983,7 @@ static VImage heifload_source( VSource source, VOption *options = 0 );
29832983
* - **background** -- Background value, std::vector<double>.
29842984
* - **page_height** -- Set page height for multipage save, int.
29852985
*
2986-
* @param filename Filename to load from.
2986+
* @param filename Filename to save to.
29872987
* @param options Set of options.
29882988
*/
29892989
void heifsave( const char *filename, VOption *options = 0 ) const;

libvips/Makefile.am

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ else
99
OPTIONAL_DIST_DIR += deprecated
1010
endif
1111

12+
if ENABLE_NSGIF
13+
OPTIONAL_LIB += foreign/libnsgif/libnsgif.la
14+
endif
15+
1216
SUBDIRS = \
1317
include \
1418
foreign \

libvips/colour/Makefile.am

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
noinst_LTLIBRARIES = libcolour.la
2-
31
SUBDIRS = profiles
42

3+
noinst_LTLIBRARIES = libcolour.la
4+
55
libcolour_la_SOURCES = \
66
profiles.c \
77
profiles.h \

0 commit comments

Comments
 (0)