<%
Function BytesToBstr(body,bianma)
	dim objstream
	set objstream = Server.CreateObject("adodb.stream")
	objstream.Type = 1
	objstream.Mode =3
	objstream.Open
	objstream.Write body
	objstream.Position = 0
	objstream.Type = 2
	objstream.Charset = bianma
	BytesToBstr = objstream.ReadText 
	objstream.Close
	set objstream = nothing
End Function

function saveimage(from,tofile)
dim geturl,objStream,imgs
geturl=trim(from)
imgs=GetImg(from)
Response.Write "<font color=red>"&formatnumber(len(imgs)/1024*2,2)&"</font>Kb<br>"
if formatnumber(len(imgs)/1024*2,2)>1 then
	Set objStream = Server.CreateObject("ADODB.Stream")
	objStream.Type =1
	objStream.Mode=3  
	objStream.Open
	objstream.write imgs
	objstream.SaveToFile server.mappath(tofile),2
	objstream.Close()
	set objstream=nothing
else
Response.Write "保存失败：<font color=red>文件大小"&formatnumber(len(imgs)/1024*2,2)&"Kb，小于1K</font><br>"
end if
end function
%>