如何使用 ImageMagick dll 分发应用程序
我正在尝试将 ImageMagick 作为在 Windows XP 计算机上运行的应用程序的一部分进行分发。对 MagickReadImage 的调用返回 MagickFalse,尽管图像确实存在且未损坏,并且来自 NewMagicWand 的 MagickWand 显然是有效的。此调用适用于安装了 ImageMagick 的计算机。目标机器不会安装 ImageMagick 软件包;我们只想提供从 .bmp 转换为 .jpeg 所需的 .dll 文件。我们还没能做到这一点,并假设我们遗漏了一块拼图。我们是否缺少配置步骤?换句话说,什么需要位于目标机器上的哪个位置?我们已将以下 dll 复制到 Windows\system32 目录:
- CORE_RL_bzlib_.dll
CORE_RL_jpeg_.dll
CORE_RL_Icms.dll
CORE_RL_magick_.dll
CORE_RL_ttf_.dll
CORE_RL_wand_.dll
CORE_RL_zlib_.dll
IM_MOD_RL_bmp_.dll
IM_MOD_RL_jpeg_.dll
mfc100.dll
msvcr100.dll
vcomp100.dll
X11.dll
有问题的代码是:
m_pMagick_wand=NewMagickWand();
m_mbStatus=MagickReadImage(m_pMagick_wand,fileName);
if (m_mbStatus == MagickFalse)
{
TRACE("MagickFalse 1\n");
return;
}
I'm trying to distribute ImageMagick as part of an application to be run on a Windows XP machine. A call to MagickReadImage returns MagickFalse, although the image is definitely present and not corrupt and the MagickWand from NewMagicWand is apparently valid. This call works on a machine with ImageMagick installed. The target machine will not have the ImageMagick package installed; we want to provide only the required .dll files to convert from .bmp to .jpeg. We have not been able to get this working, and are assuming that we are missing a piece of the puzzle. Is there a configuration step we're missing? In other words, what needs to be where on the target machine? We've copied the following dlls to the Windows\system32 directory:
- CORE_RL_bzlib_.dll
CORE_RL_jpeg_.dll
CORE_RL_Icms.dll
CORE_RL_magick_.dll
CORE_RL_ttf_.dll
CORE_RL_wand_.dll
CORE_RL_zlib_.dll
IM_MOD_RL_bmp_.dll
IM_MOD_RL_jpeg_.dll
mfc100.dll
msvcr100.dll
vcomp100.dll
X11.dll
The code in question is:
m_pMagick_wand=NewMagickWand();
m_mbStatus=MagickReadImage(m_pMagick_wand,fileName);
if (m_mbStatus == MagickFalse)
{
TRACE("MagickFalse 1\n");
return;
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论