Hello Christiano, For whatever reason, the image data coming from the Zire 72 camera is byte swapped compared to that of the Zire 71 camera. Try byte swapping on 16-bit intervals and see if that helps. There is a handy macro for this called ByteSwap16, which you can find in the header "endianutils.h". This has come up in the past, so you can search through the archives if you need more details.
Adrien. Monday, May 30, 2005, 8:50:44 AM, you wrote: CW> Hi. CW> I'm working in a application that captures a image and save it in a SD card. CW> The image is captured successfully and I can use the resulting bitmap with CW> WinDrawBitmap, then I save it to the card. But, when I access it (via the CW> image viewer of PalmOS) it appears as a corrupted image. CW> I've tried saving it using JpegLib, pnoJpegLib and now I'm just writing the CW> bitmap structure to a VFS file. CW> //captureInfo.pBitmap is the pointer to the bitmap captured by the CW> camera CW> bitmapP = captureInfo.pBitmap; CW> BmpGetSizes(bitmapP, &dataSize, &structSize); CW> error = VFSFileWrite(fileP, dataSize+structSize, bitmapP, NULL); CW> I'm using a Zire 72, with PalmOS 5.2.8, so I think the errors when saving CW> both jpegs and bmps must be because I'm not handling the captured bitmap CW> correctly. I've read some threads in this forum and articles at the CW> Knowledge Base but didn't find anything (or didn't understand it) that could CW> apply to this problem. CW> Someone with experience would help greatly. CW> Thanks for your attention, CW> Christiano. -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
