I view in the forums and any have problems with the photolib. 
My problem is when i press cancel button inthe screen who take photos, in many 
cases the treo crash. 

It`s in this line:
newPhotoH = PalmPhotoCaptureImageV2(libRefNum, &captureParam); 


when i press cancel newPhotoH is in NULL. 

Sometimes crash, and sometimes no. 

I put a part of code: 

captureParams.imageInfo.width = 640;
captureParams.imageInfo.height = 480;
captureParams.imageInfo.bitsPerPixel = 16; 
captureParams.imageInfo.fileFormat = palmPhotoJPEGFileFormat;
captureParams.imageInfo.imageQuality = palmPhotoHighestQuality;
captureParams.captureCallback= NULL;
captureParams.userDataP = NULL; 

// capture image
imageH = PalmPhotoCaptureImageV2(PhotosLibRefNum, &captureParams); 

err = PalmPhotoGetLastErrV2(PhotosLibRefNum);

if (err != errNone)
{
StrIToA(errorCodeString, err);
if (err == errorCode)
ErrDisplay("An error occured: PalmPhotoCaptureImageV2, unknown error");
else
ErrDisplay(errorCodeString);
}

if(imageH && (err = PalmPhotoGetLastErrV2(PhotosLibRefNum)) == errNone)
{
PalmPhotoCloseImageV2(PhotosLibRefNum, imageH);
}
PhotosLibClose(); 


Please i need help, i don“t find any abaout this time. 

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

Reply via email to