马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?站点注册
×
函数gf_open_pic: ////////////////////////////////////////////////////////////////// //Add by Jeffrey Jiang on 2001.11.13 //选择图片 ///////////////////////////////////////////////////////////////// //Modfiy by Jeffrey Jiang on 2001.11.15 //当图片字节大于32765时,循环读图片 /////////////////////////////////////////////////////////////////
integer li_file,li_ret,loops,i string ls_file,ls_path blob lb_small long flen,bytes_read,new_pos
//search the file li_ret = getfileopenname("选择图片文件",ls_path,ls_file, &"BMP","图片文件(*.BMP),*.BMP") if li_ret = 1 then p_1.picturename = '' p_1.picturename = '' setnull(lb_image) if li_file <> -1 then // Set a wait cursor setpointer(hourglass!)
flen = filelength(ls_file) li_file = fileopen(ls_path,streammode!,read!,lockread!) // Determine how many times to call FileRead if flen > 32765 then if mod(flen,32765)=0 then loops = flen/32765 else loops = (flen/32765) + 1 end if else loops = 1 end if // Read the file new_pos = 1 for i = 1 to loops bytes_read = fileread(li_file,lb_small) if i = 1 then lb_image = lb_small else lb_image = lb_image + lb_small end if next // close the file fileclose(li_file) end if end if return lb_image |