I'm afraid that I was a bit mixed up. I thought you were trying to
save a photo from the camera. Have you worked this problem out though?
I'm not sure from your e-mail whether you have or not.

Adrien.

Tuesday, June 8, 2004, 2:50:05 AM, you wrote:

SC> "Adrien Regimbald" <[EMAIL PROTECTED]> ha scritto nel messaggio
SC> news:[EMAIL PROTECTED]
>> Well, my Pascal is very rusty, but..
>>
>> In your declaration of the ImageData structure type, shouldn't imgH be
>> a pointer (imgH : ^UInt16)? If it's not supposed to be a pointer,
>> where are you storing the image between callbacks?
>>
>> Also, in both algorithms, the swapping seems backwards. Right now it
>> looks like:
>>
>> inputBuffer = Swap(storageBuffer);
>>
>> shouldn't it be:
>>
>> storageBuffer = Swap(inputBuffer);

SC> Yes I've solve in this way

SC> Function Swap16(n:UInt16):UInt16;
SC> begin
SC>   Result := ((((n shl 8) and $FF00) or ((n shr 8) and $00FF)));
SC> end;

SC> function SkipPtr(p: Pointer): Pointer;
SC> begin
SC>   Result := Pointer(UInt32(p)+1);
SC> end;

SC> for x := 0 to size - 1 do
SC> begin
SC>    myBuffP^ := Swap16(dataP.imgH^);
SC>    dataP.imgH := SkipPtr(dataP.imgH);
SC>    dataP^.offset := dataP^.offset + 1;
SC>    myBuffP := SkipPtr(myBuffP);
SC> end;

>>
>> Where did you get your CodeWarrior example from? It seems a bit wonky
>> - for example, the capture callback function is defined like this in
>> the PalmCameraLib API:
SC> from palmoneSdk
>>
>> typedef Err CamLibCaptureCallbackFunc(void *bufP, UInt32 size, void
SC> *userDataP)
>>
>> but for some reason, your example has the 2nd parameter being a
>> pointer. Have you successfully tried running the CodeWarrior example?
>>
SC> Yes




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

Reply via email to