<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>图片处理 - 标签 - 研发日志 · R&amp;D Log</title><link>https://rd163.visword.com/tags/%E5%9B%BE%E7%89%87%E5%A4%84%E7%90%86/</link><description>图片处理 - 标签 - 研发日志 · R&amp;D Log</description><generator>Hugo -- gohugo.io</generator><language>zh-CN</language><managingEditor>whutluohui@gmail.com (小智晖)</managingEditor><webMaster>whutluohui@gmail.com (小智晖)</webMaster><copyright>本作品采用知识共享署名-非商业性使用 4.0 国际许可协议进行许可。</copyright><lastBuildDate>Sun, 12 Jan 2025 00:00:00 +0800</lastBuildDate><atom:link href="https://rd163.visword.com/tags/%E5%9B%BE%E7%89%87%E5%A4%84%E7%90%86/" rel="self" type="application/rss+xml"/><item><title>使用 LetterAvatar 在 Go 中生成字母头像</title><link>https://rd163.visword.com/posts/golang-letter-avatar/</link><pubDate>Sun, 12 Jan 2025 00:00:00 +0800</pubDate><author><name>小智晖</name></author><guid>https://rd163.visword.com/posts/golang-letter-avatar/</guid><description><![CDATA[<h2 id="背景为什么需要字母头像" class="headerLink">
    <a href="#%e8%83%8c%e6%99%af%e4%b8%ba%e4%bb%80%e4%b9%88%e9%9c%80%e8%a6%81%e5%ad%97%e6%af%8d%e5%a4%b4%e5%83%8f" class="header-mark"></a>背景：为什么需要字母头像</h2><p>在论坛、IM、评论区这类 UGC(User-Generated Content)场景中，相当一部分用户不会主动上传头像。如果默认显示统一的灰色占位图，界面会显得单调，也不利于快速识别用户。一个常见的做法是：用昵称的首个字符叠加在彩色背景上，生成所谓的「字母头像」(Letter Avatar)。Notion、Linear、Slack 等不少 SaaS 产品都采用了类似策略。</p>]]></description></item></channel></rss>