开发者

How can I correct color banding in windows phone 7?

开发者 https://www.devze.com 2023-01-20 19:54 出处:网络
My windows phone 7 app has 开发者_StackOverflow社区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 sa

My windows phone 7 app has 开发者_StackOverflow社区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.


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:

How can I correct color banding in windows phone 7?

Next is a 16-bit without dithering:

How can I correct color banding in windows phone 7?

Finally 16-bit with Floyd-Steinberg dithering.

How can I correct color banding in windows phone 7?

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.


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消