We're using the MagickWand PHP extension(V1.0.8), and when we try to load a broken image, in magickwand.c, in function magickreadimageblob() starting from line 7765:
Code: Select all
if( MagickReadImageBlob( magick_wand, (void *) blob, (size_t) blob_len ) == MagickTrue ) {
...normal...
}
else {
/* C API cannot read the image(s) from the BLOB: output error, with reason */
MW_API_FUNC_FAIL_CHECK_WAND_ERROR( magick_wand, MagickWand, "unable to read the supplied BLOB argument" );
}
But we just want the MagickReadImageBlob() function to return false, and the error can be handled by things like MagickGetException().
For I don't check the forum often, if a copy of the solution can be sent to lsylsy2 at gmail dot com, I would appreciate it very much!