AppForge has some sample code about how to convert the string that
represents a signature into a Bitmap (in Visual Basic). The routine snippet
is here. The main routine of DrawSignature is below it.
Andre
PDBMoveFirst (db)
Do While PDBEOF(db) = False
bSuccess = ReadRecord(MyRecord, db)
frmConvertSignature.lblName.Caption = MyRecord.Name & _
"(" & MyRecord.RecordID & ")"
If bSuccess = False Then Exit Do
DrawSignature MyRecord.SignedBy, picSignature
DoEvents
SavePicture picSignature.Image, _
frmMain.txtCSVFileName.Text & "\" & MyRecord.RecordID & ".bmp"
Wait (500)
PDBMoveNext (db)
Loop ' Do While PDBEOF(db) = False
Public Sub DrawSignature(SigData As String, picDrawBox As PictureBox)
' taken from sample code in AppForge's AFSigView
Dim i As Long
Dim DataLen As Long
Dim DataPoint As tPoint
Dim OldPoint As tPoint
DataLen = Len(SigData)
picDrawBox.Cls
OldPoint.X = -1
OldPoint.Y = -1
For i = 1 To DataLen
DataPoint.X = AscW(Mid$(SigData, i, 1))
If DataPoint.X <> kSigPenUp Then
'This is a valid point so lets get the Y Coordinate
i = i + 1
DataPoint.Y = AscW(Mid$(SigData, i, 1))
'Check to see if the last point was a penup and should not be
plotted
If OldPoint.X <> -1 Then
'This is original line
picDrawBox.Line (OldPoint.X, OldPoint.Y)-(DataPoint.X,
DataPoint.Y)
End If
'Save the old point
OldPoint = DataPoint
Else
'This was a penup so if the last point is valid lets do a PSet
to catch single points between penups
If OldPoint.X <> -1 Then
picDrawBox.PSet (OldPoint.X, OldPoint.Y)
End If
OldPoint.X = -1
OldPoint.Y = -1
End If
Next i
End Sub
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
Jayanarayanan M N
Sent: Friday, August 30, 2002 5:18 AM
To: Palm Developer Forum
Subject: Re: Palm Bitmap to BMP
I guess there is no code to do the conversion today.
there some code at http://entropymine.com/jason/bmpsuite/ . This tells
how to create bmp files.
Enrico Pavesi wrote:
>I transfer a series of pdb to the PC.
>
>In the PDB every record is a Palm bitmap.
>
>Is there a tool or program to extract these bitmap to BMP format ?
>
>Thanks
>
>
>
>
>
--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/