示例#1
0
/*
 * 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 ) ) 
		return( -1 );

	return( 0 );
}
示例#2
0
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*/
}
示例#3
0
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, NULL ) );
#else
	vips_error( "im_magick2vips", 
		"%s", _( "no libMagick support in your libvips" ) ); 

	return( -1 );
#endif /*HAVE_MAGICK*/
}