<!--#include file="../checkLoginPhone.asp"-->
<!--#include file="../SQLconn.asp"-->
<%
strId=request("id")
Set rsImg = Server.CreateObject("ADODB.Recordset")
sqlimg="select * from gonggaopic where id='"&strId& "'"
rsImg.open sqlimg,conn,1,1
response.expires=0 
response.buffer=true 
response.clear 
'Response.ContentType = "image/pjpeg" 
'Response.BinaryWrite rsImg("FileValue")


Set Jpeg = Server.CreateObject("Persits.Jpeg")  

Jpeg.OpenBinary rsImg("FileValue").Value  

if jpeg.OriginalWidth>1024 then
jpeg.Width =1024 
     jpeg.Height = jpeg.OriginalHeight * jpeg.Width / jpeg.OriginalWidth  
else
  jpeg.Width=jpeg.OriginalWidth
  jpeg.Height =jpeg.OriginalHeight
end if


Jpeg.SendBinary  


Response.BinaryWrite Jpeg.Binary




rsImg.close
conn.close
%>