i used jdpalm in my attempts, maybe it will work for you too (i don't know jpeglib)
fast and ugly way is that you don't create 24bpp bitmap, create only 256color bitmap and use some conversion between 24bpp->palette color. fastest is to use nearest color with WinRGBToIndex function. if it looks too bad you may play with dithering or custom palette, but it may be not worth it if grayscale looks good also with jdpalm you can dither all jpegs to grayscale so you don't need to create extra grayscale image on pc 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. > > I do have a workaround, in that grayscale JPEG images (8-BPP) do work. My > PC-side application has the ability to convert images to grayscale before > compressing them into the PDB file, so I could just instruct 3.5 users to > select the grayscale option. In fact, I think the pictures actually look > better in grayscale on the older low-res devices; even on an M505, some color > pictures look really bad compared to the same picture on my T3. > > Anyway, I just wanted to confirm if there is any other solution for getting a > usable color bitmap out of JpegLib from standard 24-BPP JPEG compressed data > on a V3.5 device. > > Doug Gordon > -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
