【问题标题】:How to -draw text with special character -like ë- in ImageMagick如何在 ImageMagick 中使用特殊字符(如 ë-)绘制文本
【发布时间】:2014-01-02 08:54:00
【问题描述】:

我想在我的图像上绘制一些特殊字符,但是 Azië 中的字母 ë 用错误的编码字符表示。 实际上,我在 *.bat UTF8 编码文件上编写了我的脚本。 有办法解决吗?

这是我的示例代码:

-draw "rotate -4 text 385,335 'Azië'"

提前致谢

【问题讨论】:

标签: text imagemagick special-characters draw


【解决方案1】:

this answer 之后 - 您可以将批处理文件保存为 Windows 1252 编码(或其他编码),然后将您的命令包装在以下行中:

@echo off
for /f "tokens=2 delims=:." %%x in ('chcp') do set cp=%%x

rem here you change the codepage (encoding)
chcp 1252>nul

rem your commands here
-draw "rotate -4 text 385,335 'Azië'"

chcp %cp%>nul

【讨论】:

    猜你喜欢
    • 2012-11-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-09
    • 1970-01-01
    相关资源
    最近更新 更多