views:

49

answers:

3

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.

+3  A: 

The solution is to not use gradients.
There is no way round this with the colours supported by the device.

Matt Lacey
are the downvotes beccause that's not what people want to hear? Or is there another solution?
Matt Lacey
Probably because it's not what people want to hear. They'd rather you sprinked magic software-fairy dust and have it fix their hardware with 2 lines of code.
ctacke
A: 

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.

Jamey McElveen
+5  A: 

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:

alt text

Next is a 16-bit without dithering:

alt text

Finally 16-bit with Floyd-Steinberg dithering.

alt text

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.

Mark Ransom
Thanks this is exactly what I needed! Anyone know how to achieve this in Photoshop and get it to save properly?
Jamey McElveen
@Jamey, that sounds like another good question... not one for this forum I'm afraid. If I get bored I might whip up a Python script to do it, but it will be in my spare time and won't be soon. ImageMagick might also be able to do it with a `-depth 5` switch.
Mark Ransom
@Jamey, you can definitely convert to 16 bits in Photoshop, but I don't know whether it applies dithering. http://forums.adobe.com/message/1904192
Mark Ransom
Thanks! I appreciate all your comments.
Jamey McElveen