<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[运维进行时]]></title> 
<link>https://blog.liuts.com/index.php</link> 
<description><![CDATA[互联网运维与架构]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[运维进行时]]></copyright>
<item>
<link>https://blog.liuts.com/post//</link>
<title><![CDATA[如何用imagemagick在图片上写中文]]></title> 
<author>root &lt;admin@yourname.com&gt;</author>
<category><![CDATA[PHP]]></category>
<pubDate>Tue, 21 Aug 2007 15:29:54 +0000</pubDate> 
<guid>https://blog.liuts.com/post//</guid> 
<description>
<![CDATA[ 
	如何用imagemagick在图片上写中文？在帮助文档中找到的最简单的例子：<br/>convert -background lightblue -fill blue &#92;<br/>-font SimSun -pointsize 48 label:@chinese_words.utf8 &#92;<br/>label_utf8.gif<br/>需要把中文或多字节文字以utf-8编码写在chinese_words.utf8中，就可以用convert命令在图片上画出中文来。也可以直接在命令行中写中文，但是必须是utf-8编码，如：<br/>convert -background lightblue -fill blue &#92;<br/>-font SimSun -pointsize 48 label:’某人的栖息地’ &#92;<br/>label_utf8.gif<br/>最后还要注意的是，-font参数后面必须是中文字体，可以是中文字体文件的绝对路径。<br/>个人实验通过:<br/>1、/usr/bin/convert -font /www/client/webps/simsun.ttc -fill Black -draw 'text 20,29 "'`echo 中国人&#124;iconv -f GB2312 -t UTF-8`'"' -fill White -draw 'text 30,39 "'`echo 中国人&#124;iconv -f GB2312 -t UTF-8`'"' center.jpg logo.jpg<br/><br/>2、/usr/bin/convert -font /www/client/webps/simsun.ttc &#92; <br/>-fill white -pointsize 24 &#92; <br/>-draw 'text 10,20 "'`echo 我的照片&#124;iconv -f GB2312 -t UTF-8`'"' &#92; <br/>mypic.jpg mypic-with-comment.jpg <br/><br/>imagemagick参考文档<br/><a href="http://www.imagemagick.org/Usage/text/" target="_blank">http://www.imagemagick.org/Usage/text/</a><br/>Tags - <a href="https://blog.liuts.com/tags/imagemagick/" rel="tag">imagemagick</a>
]]>
</description>
</item><item>
<link>https://blog.liuts.com/post//#blogcomment</link>
<title><![CDATA[[评论] 如何用imagemagick在图片上写中文]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>https://blog.liuts.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>