As a lover of pixels, I want to spread the word on the little known feature that Windows Phone 7.5 “Mango” introduced to fix color bandings in third party applications. Of course, there’s a catch – it’s opt-in for developers. Doh.
The magic attribute is BitsPerPixel="32"
inside the App tag of WMAppManifest.xml.
On the Samsung Omnia 7, this attribute appears to enable a noise-based dithering algorithms that is applied to both brush and image resources. Since many Windows Phone apps are scarred by ugly bandings, I encourage all developers to apply and deploy this fix to their apps. The exception being video applications which get opt-in automatically.
Developers, make your Windows Phone applications beautiful. Join the fight against banding.
In case the devs are wondering, it _is_ a documented setting http://msdn.microsoft.com/en-us/library/ff769509(v=VS.92).aspx
Remember, people should only do this when their apps need it – enabling 32 bits per pixel affects overall app performance negatively. This was discussed at MIX when the setting was announced.
I very much dislike banding also. I wonder how much of a battery drain setting all apps to 32bit will result in. Another option instead of setting all apps to 32bit maybe just to minimize the use of gradients.
The left phone inevitably looks uglier than the right phone due to the pixel differences! 😛
Do different manufacturers use different GPUs (if you can call them that on a phone)? I’m assuming the performance hit depends on how good the graphics hardware being used in each phone is.
I hate banding too.
Setting your app to 32-bit (with the performance and memory hit that brings along with it) is not the only solution. Dithering. Keeps your apps efficient (still use a 16-bit buffer with the benefits that provides) and banding is reduced significantly, almost non-perceptible in some cases. If you can, set your textures to use a 16-bit pixel format as well.
If you use XNA, I have made a content pipeline extension that automates it all for you. http://konaju.com/?p=33
Work smarter, not fatter.
Alternatively, you can also pre-process images.
http://nerdplusart.com/photoshop-action-for-windows-phone-7-dithering
I LOVE this article, so much that I had to try it out on my own background image. I realy hope you don’t mind, but I created a blog about it as well, of course citing you as the source of inspiration! (http://goo.gl/loszf) I have some source code for people to try out if they’re so inclined (and have SVN).
As Laurent said pre-processing is an option, on a full screen image this adds about 150k.
Below is an alternative to the photoshop action, seemed to keep the file a bit smaller and was a bit less grainy.
http://adtsai.blogspot.com/2011/03/high-quality-dithering-for-windows.html
This means that WP7 runs in 16-bit color, when the rest of the next-gen smartphone world (i.e. the iPhone) has been 24 or 32-bit since 2007. What’s up with that?
David: Several reasons
– Battery life
– Performance (half as much data to move around)
– Memory (back buffers are half the size)
– Widest compatibility (not all displays used by manufacturers can handle 24/32-bit)
– Very few apps need more than 16-bit
– Windows Phone is not iPhone
So Windows Phone defaults to 16-bit, and apps can opt-in to 32-bit (but they may not always get it due to hardware limits).
Thanks! This got rid of my banding problem.