Over a million developers have joined DZone.

Quick Tip: 32 Bits Per Pixel in Windows Phone App

DZone's Guide to

Quick Tip: 32 Bits Per Pixel in Windows Phone App

· Mobile Zone
Free Resource

Download this comprehensive Mobile Testing Reference Guide to help prioritize which mobile devices and OSs to test against, brought to you in partnership with Sauce Labs.

Something new which came with Mango is the ability for developers to set the number of bits per pixel that our apps use.

By doing this, your app will have shiny graphics! This increase the color depth and then the gradient are rendered really more smoothly. As expert would say, there is no more banding in your image !

I have found a really great example picture on this web forum to show this :

Forcing your app to use 32 bits per pix is extremly simple to perform trough the WMAppManifest.xml file.

All you have to do is to set the value to 32 using the BitsPerPixel attribute on the App XML element.
Here is an exemple of it in my ConsoTracker WP7 app:

<App xmlns=""  BitsPerPixel="32" ProductID="{...}" Title="ConsoTracker"
   RuntimeType="Silverlight" Version="" Genre="apps.normal"
   Author="Jonathan ANTOINE" Description="Track your usage"

 You can find all the possible attributes of the App element on this page : http://msdn.microsoft.com/en-us/library/ff769509(v=vs.92).aspx

Analysts agree that a mix of emulators/simulators and real devices are necessary to optimize your mobile app testing - learn more in this white paper, brought to you in partnership with Sauce Labs.


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}