use our sniffer as well is ismagick()
We need to check files for magickload with our sniffer as well as the imagemagick one.
This commit is contained in:
parent
bb75535151
commit
dc8555201d
@ -644,13 +644,16 @@ magick_set_magick_profile( Image *image,
|
||||
/* Does a few bytes look like a file IM can handle?
|
||||
*/
|
||||
gboolean
|
||||
magick_ismagick( const unsigned char *buf, size_t length )
|
||||
magick_ismagick( const unsigned char *bytes, size_t length )
|
||||
{
|
||||
char format[MagickPathExtent];
|
||||
|
||||
magick_genesis();
|
||||
|
||||
return( GetImageMagick( buf, length, format ) );
|
||||
/* Try with our custom sniffers first.
|
||||
*/
|
||||
return( magick_sniff( bytes, length ) ||
|
||||
GetImageMagick( bytes, length, format ) );
|
||||
}
|
||||
|
||||
#endif /*HAVE_MAGICK*/
|
||||
|
@ -84,6 +84,6 @@ int magick_set_vips_profile( VipsImage *im, Image *image );
|
||||
int magick_set_magick_profile( Image *image,
|
||||
VipsImage *im, ExceptionInfo *exception );
|
||||
|
||||
gboolean magick_ismagick( const unsigned char *buf, size_t length );
|
||||
gboolean magick_ismagick( const unsigned char *bytes, size_t length );
|
||||
|
||||
#endif /*HAVE_MAGICK6*/
|
||||
|
Loading…
Reference in New Issue
Block a user