
<!--#include file="../SQLconn.asp"-->
<%
strId=request("id")
Set rsImg = Server.CreateObject("ADODB.Recordset")
sqlimg="select * from Employee 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("ÏàÆ¬").Value  

if jpeg.OriginalWidth>120 then
jpeg.Width =120 
     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
%>