Hello Eric!
 
I have just one more question.. See if you can help me...
Using PalmPhotoAddImageV2 to save a stream image into Photo Lib
it ALWAYS put "[1]" in the photo name, even if there are no photos into the lib
 
example: I put file name "pic01.jpg".. but it saves "pic01[1].jpg"..
 
tks
Daniel


 
2006/8/4, Daniel Brocco <[EMAIL PROTECTED]>:
Thanks Eric!
 
Now it's working!
 
Daniel

 
2006/8/4, Eric Lyons <[EMAIL PROTECTED]>:
Daniel,

Thanks for your detailed reply.  It confirms that you want to use the
built-in viewfinder and built-in preview capabilities in the Photo library.
Our application uses these built-in features instead of coding the
viewfinder and preview into application forms.

Our application uses PalmPhotoCaptureImageV2 to take the photo and store it
as a file stream (palmPhotoStreamLocation) called TempPhoto.jpg.  We copy it
to the expansion card and delete the file stream later.

PalmPhotoHandle handle = NULL;

PalmPhotoCaptureParamV2 captureParams;
MemSet(&captureParams, sizeof(PalmPhotoCaptureParamV2), 0x00);

//  set fileLocation parameters of capture parameter block

captureParams.fileLocation.fileLocationType = palmPhotoStreamLocation;
StrCopy( captureParams.fileLocation.file.StreamFile.name, "TempPhoto.jpg");
captureParams.fileLocation.file.StreamFile.type = 'DATA';
captureParams.fileLocation.file.StreamFile.creator = APP_CREATOR_ID;

//  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 = palmPhotoMediumQuality;

//  set captureCallback parameters of capture parameter block

captureParams.captureCallback = NULL;

//  set userDataP parameters of capture parameter block

captureParams.userDataP = NULL;

//  capture image

handle = PalmPhotoCaptureImageV2(m_photoLibRefNum, &captureParams);

Notes:

1.  Use WinScreenMode to set the screen to 16-bit depth when you want to
display the image in your application forms.

2.  The "white screen of death" occurs when you take photos with a Zire 72
in bright sunlight.  The preview displays a white (blank) image.  This
problem appears at the maximum resolution of the Zire 72:  1280x960.  The
workaround is adjusting the camera position and making multiple attempts
until a real photo appears.

Eric Lyons



--
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/

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

Reply via email to