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 thumbnail autorot [janko]
|
||||||
- fix a warning with magicksave with no delay array [chregu]
|
- fix a warning with magicksave with no delay array [chregu]
|
||||||
- fix a race in tiled tiff load [kleisauke]
|
- fix a race in tiled tiff load [kleisauke]
|
||||||
|
- better imagemagick init [LebronCurry]
|
||||||
|
|
||||||
20/6/19 started 8.9.0
|
20/6/19 started 8.9.0
|
||||||
- add vips_image_get/set_array_int()
|
- add vips_image_get/set_array_int()
|
||||||
|
@ -636,6 +636,8 @@ magick_vips_error( const char *domain, ExceptionInfo *exception )
|
|||||||
static void *
|
static void *
|
||||||
magick_genesis_cb( void *client )
|
magick_genesis_cb( void *client )
|
||||||
{
|
{
|
||||||
|
ExceptionInfo *exception;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf( "magick_genesis_cb:\n" );
|
printf( "magick_genesis_cb:\n" );
|
||||||
#endif /*DEBUG*/
|
#endif /*DEBUG*/
|
||||||
@ -643,9 +645,18 @@ magick_genesis_cb( void *client )
|
|||||||
#if defined(HAVE_MAGICKCOREGENESIS) || defined(HAVE_MAGICK7)
|
#if defined(HAVE_MAGICKCOREGENESIS) || defined(HAVE_MAGICK7)
|
||||||
MagickCoreGenesis( vips_get_argv0(), MagickFalse );
|
MagickCoreGenesis( vips_get_argv0(), MagickFalse );
|
||||||
#else /*!HAVE_MAGICKCOREGENESIS*/
|
#else /*!HAVE_MAGICKCOREGENESIS*/
|
||||||
InitializeMagick( "" );
|
InitializeMagick( vips_get_argv0() );
|
||||||
#endif /*HAVE_MAGICKCOREGENESIS*/
|
#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 );
|
return( NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user