With your advice, I checked carefully the configuration on my simulator 5 and device Zire71.
On the simulator, the image can be displayed now with original color after I enable all color depth, 1, 2, 4, 8, and 16. But the problem still exists on my Zire71. Then I try to check and dump the BitDepth. It showed 16 on both Simulator and my Zire71. After that, I get and dump the PixelFormat setting by calling "WinScreenGetAttribute(winScreenPixelFormat, &pixelFormat)" on both the Simulator and my Zire71. Unexpectedly, it was pixelFormat565LE on the simulator but pixelFormatIndexed on my Zire71. That should be the problem. There is no code in the example program to set the pixelformat but why they are different on Simulator and my Zire71. I'm finding a way to set the pixelFormat on my Zire71 but no idea. Can anybody help? each code, as well as dump the screen configuration parameters for reference. It was found that the BitDepth in S "Matthew Henry" <[EMAIL PROTECTED]> ??? news:[EMAIL PROTECTED] ???... > DongDong wrote: > > > I'm studying and testing the JPEG library from > > http://www.nyctergatis.com/jpeglib/ > > I can successfully display a jpeg file in VFS but just 16 colors, instead of > > 256 or 65536 colors originally in the file. > > I've tried studying its source and have no idea. > > Anybody has used this library and find a way to display more than 16 color > > of a jpg file. Please advise. > > > > > > > Well, JPEGs, by definition, are always 24 bit. So if you are getting > only 16 colors, I strongly suspect the problem is that your device's > screen density is set to 4-bit. Try calling the Palm API call to set > your screen to 16-bit color (I'd tell you what it is, but I'm too lazy > to look it up). > > If that doesn't work, take a close look of your code to see how the data > is being drawn to the screen. As I said, the output of the > decompression is always going to be 24-bit, so the problem is occuring > AFTER the decompression. > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
