mysql5资源共享

 找回密码
 立即注册
12
返回列表 发新帖
楼主: 降蛇伏猫喵

[PowerBuilder] 【API调用】pb调用高清摄像头黑屏

[复制链接]

2

主题

55

帖子

128

积分

注册会员

Rank: 2

积分
128
发表于 2019-7-16 03:39:54 | 显示全部楼层
stringls_photofile,ls_name stringls_named integerli_value longll_pos,ll_filelen //选择照片文件 li_value=GetFileOpenName("选择图片文件",& +ls_photofile,ls_named,"图片文件",& +"BMPFiles(*.BMP),*.BMP,"& +"JPGFiles(*.JPG),*.JPG") ifls_photofile=''orisnull(ls_photofile)thenreturn0 ll_filelen=FileLength(ls_photofile) IFll_filelen>327650THEN Messagebox('出错','文件超出最大限制320K,建议使用大小320K以下图片!') return0 endif sle_photo.text=ls_photofile ls_name=ls_photofile ll_pos=pos(ls_name,'\') dowhilell_pos>0 ls_name=right(ls_name,len(ls_name)-ll_pos) ll_pos=pos(ls_name,'\') loop sle_name.text=ls_name integerli_fnum,li_set longll_bytes blobEmp_Id_Pic li_fnum=FileOpen(ls_photofile ,StreamMode!) ll_bytes=FileReadEx(li_fnum,Emp_Id_Pic) ifisnull(ll_bytes)thenll_bytes=-1 il_picread=ll_bytes ifil_picread>0then ib_pic=Emp_Id_Pic else return0 endif li_set=p_1.setpicture(ib_pic) ifisnull(li_set)thenli_set=-1 ifli_set<=0then il_picread=0 return0 endif //数据库中调用 selectbloberp_imginto:lb_picturefromerp_img_setupwhereimg_id=:ll_no; p_1.setpicture(lb_picture)
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|mysql5.com Inc. ( 闽ICP备17002856号-1 )

GMT+8, 2019-12-7 01:58 , Processed in 0.042839 second(s), 17 queries .

Powered by MySQL5.com X3.4

© 2003-2019 MySQL5.com.

快速回复 返回顶部 返回列表