【发布时间】:2017-01-23 09:36:44
【问题描述】:
我有一些 MagickWand 代码,其中 MagickReadImage() 在另一个系统上运行失败(返回 MagickFalse)。
现在没有异常发生,MagickGetException() 返回一个空字符串,如果我正确理解文档,这意味着没有异常。
我要打开的文件就在那里,可以用同一用户下的其他工具打开,而且我使用的magick_wand不为NULL。
调用周围的代码基本上是这样的:
// read image
MagickBooleanType status = MagickReadImage(magick_wand, fn_selector);
// make sure it worked
if (status == MagickFalse)
{
char *description;
ExceptionType severity;
description=MagickGetException(magick_wand,&severity);
fprintf(stderr,"%s %s %lu :%s: %u\n",GetMagickModule(),description,severity);
description=(char *) MagickRelinquishMemory(description);
fprintf(stderr, "magickwand couldn't read file %s\n", fn_selector);
exit(1);
}
有什么方法可以找出函数调用失败的原因吗? MagickReadImage() 似乎调用了一个不容易调试的内部函数,如果不是绝对必要的话,我不想自己构建 MagickWand 库并添加调试内容。
使用 MagickWand 版本 6.8.9.9 (debian jessie)
【问题讨论】:
标签: c++ imagemagick magickwand