GraphicsMagick 无法打开 Ghostscript 注册表项

问题描述 投票:0回答:1

我正在尝试在 Windows 上使用 GraphicsMagick 为图像和 pdf 添加水印。使用版本1.3.41。我还按照自述文件安装了 Ghostscript 和字体。 但是,我仍然收到 GraphicsMagick 找不到 Ghostscript 字体的错误。

我使用的命令是:

gm convert logo.jpg -debug -fill "red" -pointsize 30 -draw "text 10,10 'Sample Watermark'" output.jpg

调试后显示:

11:54:07 0:0.057157  0.000u 1692 nt_base.c/NTGhostscriptFind/1414/Configure:
  RegOpenKeyExA() failed to open "HKEY_LOCAL_MACHINE\SOFTWARE\GPL Ghostscript" (The system cannot find the file specified.)

但是,当我查看注册表时,该密钥就在那里! 它还具有子项 10.02.0,其中包含必要的键值。

我检查了GraphicsMagick的来源(http://hg.code.sf.net/p/graphicsmagick/code/file/7bab2a506b65/magick/nt_base.c第1414行),但找不到任何相关内容。 Ghostscript 的版本控制方案很久以前就已经在 GraphicsMagick 中进行了修补,因此这不可能是问题所在。似乎Windows命令打开注册表项出现错误,但我不明白为什么。

ghostscript graphicsmagick
1个回答
0
投票

好的,我找到了解决方法。事实证明该键也存在于“HKEY_CURRENT_USER”中,但不具有 GraphicsMagick 期望的值。我从“HKEY_LOCAL_MACHINE”位置复制了这些,现在它确实拾取了它。不过仍然感觉像是一个错误。

© www.soinside.com 2019 - 2024. All rights reserved.