more magick tweaks
This commit is contained in:
parent
8dcaa45489
commit
e518427437
@ -657,7 +657,7 @@ vips_foreign_load_start( VipsImage *out, void *a, void *dummy )
|
||||
* image into @real. They must match exactly in size, bands,
|
||||
* format and coding for the copy to work.
|
||||
*
|
||||
* Someversions of ImageMagick give different results between
|
||||
* Some versions of ImageMagick give different results between
|
||||
* Ping and Load for some formats, for example.
|
||||
*/
|
||||
if( load->real->Xsize != out->Xsize ||
|
||||
@ -666,7 +666,8 @@ vips_foreign_load_start( VipsImage *out, void *a, void *dummy )
|
||||
load->real->Coding != out->Coding ||
|
||||
load->real->BandFmt != out->BandFmt ) {
|
||||
vips_error( object_class->nickname,
|
||||
"%s", _( "header() and load() differ" ) );
|
||||
"%s", _( "header() and load() report "
|
||||
"different dimensions" ) );
|
||||
return( NULL );
|
||||
}
|
||||
}
|
||||
|
@ -674,8 +674,6 @@ vips__magick_read( const char *filename, VipsImage *out )
|
||||
/* This has severe issues. See:
|
||||
*
|
||||
* http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=20017
|
||||
*
|
||||
* Don't use.
|
||||
*/
|
||||
int
|
||||
vips__magick_read_header( const char *filename, VipsImage *im )
|
||||
|
@ -101,7 +101,7 @@ 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
|
||||
*
|
||||
*/
|
||||
static int
|
||||
vips_foreign_load_magick_header( VipsForeignLoad *load )
|
||||
{
|
||||
@ -112,14 +112,13 @@ vips_foreign_load_magick_header( VipsForeignLoad *load )
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
*/
|
||||
|
||||
static int
|
||||
vips_foreign_load_magick_load( VipsForeignLoad *load )
|
||||
{
|
||||
VipsForeignLoadMagick *magick = (VipsForeignLoadMagick *) load;
|
||||
|
||||
if( vips__magick_read( magick->filename, load->out ) )
|
||||
if( vips__magick_read( magick->filename, load->real ) )
|
||||
return( -1 );
|
||||
|
||||
return( 0 );
|
||||
@ -148,13 +147,8 @@ vips_foreign_load_magick_class_init( VipsForeignLoadMagickClass *class )
|
||||
load_class->get_flags_filename =
|
||||
vips_foreign_load_magick_get_flags_filename;
|
||||
load_class->get_flags = vips_foreign_load_magick_get_flags;
|
||||
load_class->header = vips_foreign_load_magick_load;
|
||||
|
||||
/* See comment above.
|
||||
*
|
||||
load_class->header = vips_foreign_load_magick_header;
|
||||
load_class->load = vips_foreign_load_magick_load;
|
||||
*/
|
||||
|
||||
VIPS_ARG_STRING( class, "filename", 1,
|
||||
_( "Filename" ),
|
||||
|
Loading…
Reference in New Issue
Block a user