如何纠正 Windows Phone 7 中的色带?
我的 Windows Phone 7 应用程序有非常漂亮的背景图像,但它们被 16 位颜色设备上的色带破坏了。有什么方法可以纠正这个问题吗?我尝试过在 Photoshop 中以几种不同的模式保存,但没有成功。
My windows phone 7 app has very nice background images but they are being destroyed by color banding on a 16bit color device. Is there a way I can correct this? I have tried saving in several different modes in photoshop to no avail.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您需要使用抖动。 Floyd-Steinberg 是一个很好的算法,简单且运行速度快。
您不需要按照另一个答案的建议转到每像素 8 位,您可以直接转到每像素 16 位。在开始之前你需要知道它是如何分成R/G/B的。
以下是一些示例,首先是原始的 24 位:
接下来是无抖动的 16 位:
< img src="https://i.sstatic.net/FmL5T.png" alt="alt text">
最终 16 位,带有 Floyd-Steinberg 抖动。
PS 我用 Paint Shop Pro 做了这个,我不知道 Photoshop 是否有类似的东西。您也可以用代码来完成。
You need to use dithering. Floyd-Steinberg is a good algorithm that is simple and runs fast.
You don't need to go to 8 bits per pixel as suggested by another answer, you can go directly to 16 bits per pixel. You need to know how it is split into R/G/B before you begin.
Here are some examples, first up is the original 24-bit:
Next is a 16-bit without dithering:
Finally 16-bit with Floyd-Steinberg dithering.
P.S. I did this with Paint Shop Pro, I don't know if Photoshop has anything similar. You can do it in code as well.
解决方案是不直接使用渐变。
设备支持的颜色无法解决这个问题。
另一种方法是创建一个抖动图像并使用它。
The solution is to not use gradients directly.
There is no way round this with the colours supported by the device.
The alternative is to create a dithered image and use that instead.
如果我将模式设置为 8 位并使用“网络调色板”进行抖动,这会产生非常好的结果。这比带状图像好看得多。不过我最终可能会得到两个版本的背景图像。一种适用于 16 位,另一种适用于 24 位及以上。
If I set the mode to 8bit and dither using the "web palette" this creates a pretty good result. This is MUCH better looking than the banded image. However I will probably end up with 2 versions of the background image. One for 16 bit and one for 24 bit and above.
如果你有 Photoshop,就可以了。
适用于 Windows Phone 7 抖动的 Photoshop Action
“下载”图像链接已损坏。
因此,请使用“如何安装和使用它”列表中的下载链接。
Here you go if you have Photoshop.
Photoshop Action for Windows Phone 7 Dithering
The "download"-image link is broken.
So use the download link in the "How to Install and Use It" list.