Eric, When I run this code, I don't get the standard "single photo capture" dialog. I'm running on a Zire72 with version 2 of the Photo Library. Is there something else needed to set this up?
Thanks -Allan -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, January 03, 2006 11:23 AM To: Palm Developer Forum Subject: Confirmation Image Missing in PalmPhotoCaptureImageV2 call I'm working on an application that includes camera functionality. Users will tap a selector trigger that displays the standard "single photo capture" dialog (see capture.jpg attachment). After capturing a photo, the standard "photo confirmation" dialog is displayed to review the photo (see confirm.jpg attachment). If the save button is selected, the JPG photo data will be copied into our database tables. >From code examples, I am able to successfully capture a photo to a file stream or VFS volume using the PalmPhotoCaptureImageV2 API. See the code sample below. However, the image in the "photo confirmation" dialog is empty (whitespace) even though the image in a file stream or file in a VFS volume contains the correct picture data. What is missing to make the confirmation image work properly with the PalmPhotoCaptureImageV2 API? Thank you! Eric Lyons // get reference number for Palm photo library UInt16 libRefNum; Err err = SysLibFind(PalmPhotoLibName, &libRefNum); if (err) { err = SysLibLoad(PalmPhotoLibTypeID, PalmPhotoLibCreatorID, &libRefNum); if (err) return false; } // ensure Palm photo library is version two // (Zire 72 has 2.0, Treo 650 has 3.0) UInt32 libVersion = 0; err = PalmPhotoLibGetVersion(libRefNum, kPalmPhotoLibVersion2, &libVersion); if (err || (libVersion < kPalmPhotoLibVersion2)) return false; err = PalmPhotoLibOpen(libRefNum); if (err) return false; // iterate VFS volumes and use first volume to store photo UInt16 volRefNum = 0; UInt32 volIterator = vfsIteratorStart; Err err = VFSVolumeEnumerate(&volRefNum, &volIterator); if (err) return err; // set fileLocation parameters of capture parameter block PalmPhotoCaptureParamV2 captureParams; MemSet(&captureParams, sizeof(PalmPhotoCaptureParamV2), 0x00); captureParams.fileLocation.fileLocationType = palmPhotoVFSLocation; StrCopy(captureParams.fileLocation.file.VFSFile.name, "/DCIM/test.jpg"); captureParams.fileLocation.file.VFSFile.volumeRef = volRefNum; // set imageInfo parameters of capture parameter block captureParams.imageInfo.width = 640; captureParams.imageInfo.height = 480; captureParams.imageInfo.bitsPerPixel = 16; captureParams.imageInfo.fileFormat = palmPhotoJPEGFileFormat; captureParams.imageInfo.imageQuality = palmPhotoHighestQuality; // set captureCallback and userDataP parameters of capture parameter block captureParams.userDataP = NULL; captureParams.userDataP = NULL; // capture image PalmPhotoHandle handle = PalmPhotoCaptureImageV2(libRefNum, &captureParams); -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/