never delay-load IM files
IM is too unreliable to be able to separate Ping and Read, always Read
This commit is contained in:
parent
3b5e049fd6
commit
19c0f928a7
@ -33,8 +33,8 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
*/
|
||||
#define DEBUG
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
@ -101,24 +101,16 @@ vips_foreign_load_magick_get_flags( VipsForeignLoad *load )
|
||||
* 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_header( magick->filename, load->out ) )
|
||||
return( -1 );
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
static int
|
||||
vips_foreign_load_magick_load( VipsForeignLoad *load )
|
||||
{
|
||||
VipsForeignLoadMagick *magick = (VipsForeignLoadMagick *) load;
|
||||
|
||||
if( vips__magick_read( magick->filename, load->real ) )
|
||||
if( vips__magick_read( magick->filename, load->out ) )
|
||||
return( -1 );
|
||||
|
||||
return( 0 );
|
||||
@ -148,7 +140,7 @@ vips_foreign_load_magick_class_init( VipsForeignLoadMagickClass *class )
|
||||
vips_foreign_load_magick_get_flags_filename;
|
||||
load_class->get_flags = vips_foreign_load_magick_get_flags;
|
||||
load_class->header = vips_foreign_load_magick_header;
|
||||
load_class->load = vips_foreign_load_magick_load;
|
||||
load_class->load = NULL;
|
||||
|
||||
VIPS_ARG_STRING( class, "filename", 1,
|
||||
_( "Filename" ),
|
||||
|
Loading…
Reference in New Issue
Block a user