直接保存URL图像或网页到服务器本地的类(2)



            
            if fsize=0 then 
                exit function 
                R_write "无有效数据保存",0
            end if

            ADOS.Write fdata    
            ADOS.Position=0

            SaveName=iSaveName
            SavePath=iSavePath
            SaveMode=iSaveMode

            '写文本对象读取图像长宽和类型

            ADOS.Position=0 '重置数据开始位置 
            bFlag=ADOS.read(3)

            if isNull(bFlag) then 
                width=0
                height=0
                imgSize=0
                imgType="unknow"
                ret(0)=imgType:ret(1)=width:ret(2)=height:ret(3)=""
                getimagesize=ret
                exit function
            end if

            '取文件类型和长宽
            select case hex(binVal(bFlag))
            case "4E5089":
                ADOS.read(15)
                ret(0)="png"
                ret(1)=BinVal2(ADOS.read(2))

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/3625.html