diff --git a/ChangeLog b/ChangeLog index cee2872a..b34caa49 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 20/7/12 started 7.30.0 - support "rs" mode in vips7 - add --vips-version cmdline arg +- fix --without-tiff / exr / jpeg / png / magick 19/3/12 started 7.29.0 - sanity-check PNG read geometry diff --git a/libvips/deprecated/im_exr2vips.c b/libvips/deprecated/im_exr2vips.c index 639e9c26..2498b535 100644 --- a/libvips/deprecated/im_exr2vips.c +++ b/libvips/deprecated/im_exr2vips.c @@ -53,7 +53,13 @@ int im_exr2vips( const char *filename, IMAGE *out ) { +#ifdef HAVE_OPENEXR return( vips__openexr_read( filename, out ) ); +#else + vips_error( "im_exr2vips", _( "no OpenEXR support in your libvips" ) ); + + return( -1 ); +#endif /*HAVE_OPENEXR*/ } static const char *exr_suffs[] = { ".exr", NULL }; diff --git a/libvips/deprecated/im_jpeg2vips.c b/libvips/deprecated/im_jpeg2vips.c index d4c677eb..e90b6ee8 100644 --- a/libvips/deprecated/im_jpeg2vips.c +++ b/libvips/deprecated/im_jpeg2vips.c @@ -110,9 +110,15 @@ jpeg2vips( const char *name, IMAGE *out, gboolean header_only ) return( -1 ); } +#ifdef HAVE_JPEG if( vips__jpeg_read_file( filename, out, header_only, shrink, fail_on_warn ) ) return( -1 ); +#else + vips_error( "im_jpeg2vips", _( "no JPEG support in your libvips" ) ); + + return( -1 ); +#endif /*HAVE_JPEG*/ return( 0 ); } diff --git a/libvips/deprecated/im_magick2vips.c b/libvips/deprecated/im_magick2vips.c index 2cedd961..9595a83b 100644 --- a/libvips/deprecated/im_magick2vips.c +++ b/libvips/deprecated/im_magick2vips.c @@ -46,7 +46,14 @@ int im_magick2vips( const char *filename, IMAGE *out ) { +#ifdef HAVE_MAGICK return( vips__magick_read( filename, out ) ); +#else + vips_error( "im_magick2vips", + _( "no libMagick support in your libvips" ) ); + + return( -1 ); +#endif /*HAVE_MAGICK*/ } static int diff --git a/libvips/deprecated/im_png2vips.c b/libvips/deprecated/im_png2vips.c index 0475b982..a389361d 100644 --- a/libvips/deprecated/im_png2vips.c +++ b/libvips/deprecated/im_png2vips.c @@ -80,6 +80,7 @@ png2vips( const char *name, IMAGE *out, gboolean header_only ) return( -1 ); } +#ifdef HAVE_PNG if( header_only ) { if( vips__png_header( filename, out ) ) return( -1 ); @@ -88,6 +89,11 @@ png2vips( const char *name, IMAGE *out, gboolean header_only ) if( vips__png_read( filename, out ) ) return( -1 ); } +#else + vips_error( "im_png2vips", _( "no PNG support in your libvips" ) ); + + return( -1 ); +#endif /*HAVE_PNG*/ return( 0 ); } diff --git a/libvips/deprecated/im_tiff2vips.c b/libvips/deprecated/im_tiff2vips.c index acb899cd..f67f8a3a 100644 --- a/libvips/deprecated/im_tiff2vips.c +++ b/libvips/deprecated/im_tiff2vips.c @@ -91,6 +91,7 @@ tiff2vips( const char *name, IMAGE *out, gboolean header_only ) return( -1 ); } +#ifdef HAVE_TIFF if( header_only ) { if( vips__tiff_read_header( filename, out, page ) ) return( -1 ); @@ -99,6 +100,11 @@ tiff2vips( const char *name, IMAGE *out, gboolean header_only ) if( vips__tiff_read( filename, out, page ) ) return( -1 ); } +#else + vips_error( "im_tiff2vips", _( "no TIFF support in your libvips" ) ); + + return( -1 ); +#endif /*HAVE_TIFF*/ return( 0 ); }