WoW Addon 中图像周围的白框
我的《魔兽世界》插件遇到了一些问题。每当我在插件中显示 TGA 文件时,它们周围都会有一个细细的白框。当我将它们转换为 BLP 时,也会发生同样的情况。
当我用预览查看图像本身时,没有白框,但魔兽世界决定显示一个。
我该如何解决这个问题?
I am having some trouble with my World of Warcraft addon. Whenever I display my TGA files in the addon, there is a thin white frame around them. The same happens when I convert them to BLPs.
When I look at the images themselves with Preview, there's no white frame, but WoW decides to display one.
How do I resolve this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我猜您正在使用带有 Alpha 通道的 TGA 文件,并且“细白框”大约是一个像素或更小。
这通常是在计算 Alpha 通道之前放置在图稿不透明边缘下方的遮罩的效果。解决方案是生成您自己的 Alpha 通道,并将边缘羽化一个像素左右,从而掩盖遮罩。
解释实际上比这复杂一点,但方法有效。
I'm guessing you are using TGA files with an alpha channel and the "thin white frame" is about a pixel or less.
This is usually the effect of a matte that is placed under the opaque edges of the artwork prior to calculating the alpha channel. The solution is to generate your own alpha channel and feather the edges in by a pixel or so thus masking the matte.
The explanation is actually a tad more complex than this, but the method works.