fix --without-magick etc.
the vips7 compat readers like im_exr2vips() were not guarded with ifdefs in case their read library was missing
This commit is contained in:
parent
bc13abe3da
commit
133ee84794
@ -1,6 +1,7 @@
|
|||||||
20/7/12 started 7.30.0
|
20/7/12 started 7.30.0
|
||||||
- support "rs" mode in vips7
|
- support "rs" mode in vips7
|
||||||
- add --vips-version cmdline arg
|
- add --vips-version cmdline arg
|
||||||
|
- fix --without-tiff / exr / jpeg / png / magick
|
||||||
|
|
||||||
19/3/12 started 7.29.0
|
19/3/12 started 7.29.0
|
||||||
- sanity-check PNG read geometry
|
- sanity-check PNG read geometry
|
||||||
|
@ -53,7 +53,13 @@
|
|||||||
int
|
int
|
||||||
im_exr2vips( const char *filename, IMAGE *out )
|
im_exr2vips( const char *filename, IMAGE *out )
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_OPENEXR
|
||||||
return( vips__openexr_read( filename, out ) );
|
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 };
|
static const char *exr_suffs[] = { ".exr", NULL };
|
||||||
|
@ -110,9 +110,15 @@ jpeg2vips( const char *name, IMAGE *out, gboolean header_only )
|
|||||||
return( -1 );
|
return( -1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_JPEG
|
||||||
if( vips__jpeg_read_file( filename, out,
|
if( vips__jpeg_read_file( filename, out,
|
||||||
header_only, shrink, fail_on_warn ) )
|
header_only, shrink, fail_on_warn ) )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
|
#else
|
||||||
|
vips_error( "im_jpeg2vips", _( "no JPEG support in your libvips" ) );
|
||||||
|
|
||||||
|
return( -1 );
|
||||||
|
#endif /*HAVE_JPEG*/
|
||||||
|
|
||||||
return( 0 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,14 @@
|
|||||||
int
|
int
|
||||||
im_magick2vips( const char *filename, IMAGE *out )
|
im_magick2vips( const char *filename, IMAGE *out )
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_MAGICK
|
||||||
return( vips__magick_read( filename, out ) );
|
return( vips__magick_read( filename, out ) );
|
||||||
|
#else
|
||||||
|
vips_error( "im_magick2vips",
|
||||||
|
_( "no libMagick support in your libvips" ) );
|
||||||
|
|
||||||
|
return( -1 );
|
||||||
|
#endif /*HAVE_MAGICK*/
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -80,6 +80,7 @@ png2vips( const char *name, IMAGE *out, gboolean header_only )
|
|||||||
return( -1 );
|
return( -1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_PNG
|
||||||
if( header_only ) {
|
if( header_only ) {
|
||||||
if( vips__png_header( filename, out ) )
|
if( vips__png_header( filename, out ) )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
@ -88,6 +89,11 @@ png2vips( const char *name, IMAGE *out, gboolean header_only )
|
|||||||
if( vips__png_read( filename, out ) )
|
if( vips__png_read( filename, out ) )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
vips_error( "im_png2vips", _( "no PNG support in your libvips" ) );
|
||||||
|
|
||||||
|
return( -1 );
|
||||||
|
#endif /*HAVE_PNG*/
|
||||||
|
|
||||||
return( 0 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
|
@ -91,6 +91,7 @@ tiff2vips( const char *name, IMAGE *out, gboolean header_only )
|
|||||||
return( -1 );
|
return( -1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_TIFF
|
||||||
if( header_only ) {
|
if( header_only ) {
|
||||||
if( vips__tiff_read_header( filename, out, page ) )
|
if( vips__tiff_read_header( filename, out, page ) )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
@ -99,6 +100,11 @@ tiff2vips( const char *name, IMAGE *out, gboolean header_only )
|
|||||||
if( vips__tiff_read( filename, out, page ) )
|
if( vips__tiff_read( filename, out, page ) )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
vips_error( "im_tiff2vips", _( "no TIFF support in your libvips" ) );
|
||||||
|
|
||||||
|
return( -1 );
|
||||||
|
#endif /*HAVE_TIFF*/
|
||||||
|
|
||||||
return( 0 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user