Doug Gordon wrote:
I just discovered that my app is having problems on old 3.5 devices
because JpegLib is getting an error when decompressing color JPEG
data, getting an "Unsupported bit depth" from the internal Bitmap.c
module. Apparently 3.5 did not like 24-BPP at all, which is what
JPEG color is by default. It works on 4.0 and up.

The data within the JPEG image is going to essentially be 24-bit, but
the Palm OS code will never even see the 24-bit data.  Even current
versions have no support for 24-bit bitmaps as far as I know.

The JpegLib code itself will have to convert it to 16-bit, which
requires creating a 16-bit (direct color, not indexed) Palm OS
bitmap for JpegLib to write the image into.

So, that means creating a BitmapTypeV2 (a Version 2 Palm OS bitmap).
The Bitmaps section of the API Reference says that Version 2 bitmaps
are indeed supported in Palm OS 3.5 and later.  However, it also
says "BitmapTypeV2 is defined only if High-Density Display Feature
Set is present".

Therefore, my guess is that if you want to support color JPEGs on
devices older than OS 4.0, what you're going to need to do is check
for the High-Density Display Feature Set and decode to color only
if it's present.  That will mean greyscale on some OS 3.5 devices
and color on others.  I can't think of what device actually *has*
OS 3.5 and high-density display, but maybe the Tungsten W or
something?

  - Logan

--
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to