How To use High Density Bitmaps in PalmOS applications
Previous Topic  Next Topic 

Problem:        How To use High Density Bitmaps in PalmOS applications


Solution:        Starting with Satellite Forms 7.0, high density (HD) bitmaps can be used in your PalmOS applications.  Most Palm Powered devices running the PalmOS 5.x operating system have higher resolution screens (320x320 pixels) than previous generation PalmOS devices that have 160x160 pixel screens.  Rather than adopting a design like most PCs where the physical size of objects on the screen change based on the screen resolution, PalmOS designers cleverly adopted a different approach where the density of objects on the screen increased for higher display quality, but the physical size remains the same as with previous generation standard density displays.


On Palm Powered devices with high density screens, the number of pixels in a screen object is quadrupled in the same physical space, as the pixels have doubled both in width and in height.  This design automatically results in sharper fonts, and if the application includes them, sharper images as well.  On a device with the standard density screen, the standard density fonts and images are shown.


Previous versions of Satellite Forms included support for standard density images only.  Now, with Satellite Forms 7.0, high density images for PalmOS applications are also supported.  An example application showing both a standard density and high density version of the same image is shown below (displayed on a high density screen):




As you can see, the high density image occupies the same amount of space on the screen, but is much sharper.


Assuming you are already familiar with how to use color bitmaps in your application, adding support for high density images is easy.  High density bitmaps are supported at the 8 and 16 bit color depths.  To add an 8 bit high density image to your application, save the high density version of your bitmap with the -8-HD.bmp file suffix.  To add a 16 bit high density image to your application, save the high density version of your bitmap with the -16-HD.bmp file suffix. 


The HD versions of your bitmaps need to be exactly twice as wide and twice as tall as the standard density versions.  In the example above (included with SatForms 7.0 as the HighDensityBitmaps sample project), the standard density bitmap is 44x43 pixels.  The high density version of the image is thus 88x86 pixels in size.


App Designer will always display the standard density version of the image in the form designer view: it will not display the high density version of the image even if it is available.


Note: PalmOS record size limitations require that image families (a collection of the same image at different color bit depths, eg. monochrome, 8-bit and 16-bit colors) must not exceed a total of 64KB in size.  Because high density images require 4 times as many pixels as standard density images, this limitation becomes much more of a concern than it does with standard density images.


TIP #1: As demonstrated in the HighDensityBitmaps sample project, one strategy to reduce the total size of a bitmap family in order to make room for high density images, is to reduce the number if bit depths included in your image family.  The Palm logo image in the sample project is included at the required monochrome depth plus an 8-bit standard density, 16-bit standard density, and 16-bit high density version.  The app does not include an 8-bit high density version, because high density PalmOS devices can automatically use the 16-bit version.  In fact, if your app is guaranteed to run only on PalmOS 5.x devices (whether they have standard density or high density screens), you can opt to leave out the 8-bit images altogether in favour of just the 16 bit versions.


TIP #2: If you find that a particular image you want to display is simply too large, divide it in half into two images.  Place them side by side on your form, and the result should appear to be the single full size image on the screen.


Keywords:      bitmap, high density, HD, pixel, color, image, logo, picture


KB ID: 10034 

Updated: 2010-06-22


Satellite Forms KnowledgeBase Online

Satellite Forms Website Home