improve imagemagick init
graphicsmagick, in some configurations, needs to be told to init the various loaders. Thanks @LebronCurry See https://github.com/libvips/libvips/issues/1528
This commit is contained in:
parent
6605029bc3
commit
fc9edfe593
@ -4,6 +4,7 @@
|
||||
- fix thumbnail autorot [janko]
|
||||
- fix a warning with magicksave with no delay array [chregu]
|
||||
- fix a race in tiled tiff load [kleisauke]
|
||||
- better imagemagick init [LebronCurry]
|
||||
|
||||
20/6/19 started 8.9.0
|
||||
- add vips_image_get/set_array_int()
|
||||
|
@ -636,6 +636,8 @@ magick_vips_error( const char *domain, ExceptionInfo *exception )
|
||||
static void *
|
||||
magick_genesis_cb( void *client )
|
||||
{
|
||||
ExceptionInfo *exception;
|
||||
|
||||
#ifdef DEBUG
|
||||
printf( "magick_genesis_cb:\n" );
|
||||
#endif /*DEBUG*/
|
||||
@ -643,9 +645,18 @@ magick_genesis_cb( void *client )
|
||||
#if defined(HAVE_MAGICKCOREGENESIS) || defined(HAVE_MAGICK7)
|
||||
MagickCoreGenesis( vips_get_argv0(), MagickFalse );
|
||||
#else /*!HAVE_MAGICKCOREGENESIS*/
|
||||
InitializeMagick( "" );
|
||||
InitializeMagick( vips_get_argv0() );
|
||||
#endif /*HAVE_MAGICKCOREGENESIS*/
|
||||
|
||||
/* This forces *magick to init all loaders. We have to do this so we
|
||||
* can sniff files with GetImageMagick().
|
||||
*
|
||||
* We don't care about errors from magickinit.
|
||||
*/
|
||||
exception = magick_acquire_exception();
|
||||
(void) GetMagickInfo( "*", exception );
|
||||
magick_destroy_exception(exception);
|
||||
|
||||
return( NULL );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user