我正在使用Flexcode sdk。我不知道如何将图像位置(如代码中的imgpath)保存为位图。保存后,我希望将其分配到图片框。我可以知道如何将图像路径位置保存到位图,然后将其(位图)分配给图片框。
private void FormAttendance_Load(object sender, EventArgs e)
{
verStudentFingerprint.PictureSampleHeight = (short)(pictureBoxAttendanceVerification.Height * 15); //FlexCodeSDK use Twips. 1 pixel = 15 twips
verStudentFingerprint.PictureSampleWidth = (short)(pictureBoxAttendanceVerification.Width * 15); //FlexCodeSDK use Twips. 1 pixel = 15 twips
imgPath = AppDomain.CurrentDomain.BaseDirectory + "Finger3.bmp";
verStudentFingerprint.PictureSamplePath = imgPath;
}
void ver_FPVerificationImage()
{
pictureBoxAttendanceVerification.Load(imgPath);
if (imgPath == AppDomain.CurrentDomain.BaseDirectory + "Finger3.bmp")
{
imgPath = AppDomain.CurrentDomain.BaseDirectory + "Finger5.bmp";
}
else
{
imgPath = AppDomain.CurrentDomain.BaseDirectory + "Finger3.bmp";
}
verStudentFingerprint.PictureSamplePath = imgPath;
}