Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

Windows Mobile and Color Depth

8 Feb 2010 0  
This question has come up three times in the various forums in which I participate, so I thought it would be appropriate for me to write a post about it.

This question has come up three times in the various forums in which I participate, so I thought it would be appropriate for me to write a post about it.

Does Windows Mobile support 24-bit images?

It's been long rumored that the Windows Mobile operating system is not capable of working with images that use 24-bit pixel depth and that Microsoft should do something about this. The truth of the matter is that the Windows Mobile Operating system does support 24-bit colors. But most OEMs don't use 24-bit display hardware on their devices. A parallel to this is having a Blu-Ray player connected to a standard definition TV and concluding that because of the way images look on the screen, the Blu-ray player must not support high definition.

If you've never run into the challenges that can come with using certain images with limited pixel depth, then you already know why you would want more pixels per color. If you've not run into this problem before, I'll explain. Let's say we are working with a monochrome (black-and-white) display. On this display, we want to display an image with a gradual transition from white (on the left of the image) to black (on the right side of the image). If I allow 2 bits to be used to represent colors, then there are four values that can be used to represent color intensities: 00, 01, 10, and 11. With four colors, the image I described looks like the following:

If I add another bit to represent colors, then I have 8 possible values to represent color intensities: 000, 001, 010, 011, 100, 101, 110, and 111. Using 3 bits per color intensity, the transition in the image looks more gradual.

If I go with 8 bits, then there are 256 color intensities. With 256 color intensities, the transition in the image is smooth.

The key thing to take from the images above is that with less bits per image, the color transitions are not as smooth. This can be rather frustrating when you go from editing an image on a system with high color depth (8-bits for red, green, blue and possibly 8 more bits for transparency) to a system with a lower color depth (5-bits for red, 5 or 6 bits for green, and 5 bits for blue) can be rather frustrating at times. After all, you want your images to look the same in the design environment and on the target. For the short term, I think it's best to have the designer view image assets in 16-bit mode to ensure they look okay before handing them off to the developer. My hopes are that for the long term, we will begin seeing some Windows Mobile hardware implementations that have 24-bit displays.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here