下面两个文件 :
<!-#포함 virtual =/intels/chunfeng/graphicdetect.asp->
<html>
<헤드>
<title> </title>
</head>
<바디 bgcolor =#ffffff>
<%
그래픽 = 이미지/intels.gif
hw = readimg (그래픽)
응답. 그래픽 및 치수 작성 : & HW (0) & X & HW (1)
& <br>
response.write <img src =/ & 그래픽 &
응답. write height = & hw (0) &
응답. width = & hw (0) &>
%>
</body>
</html>
------------------------
GraphicDetect.asp
<%
Dim HW
기능 ascat (s, n)
ASCAT = ASC (MID (S, N, 1))
엔드 기능
기능 hexat (s, n)
hexat = hex (ascat (s, n))
엔드 기능
기능 ISJPG (fichero)
악기 (ucase (fichero), .jpg) <> 0 인 경우
isjpg = true
또 다른
isjpg = false
끝 If
엔드 기능
기능 ispng (fichero)
악기 (ucase (fichero), .png) <> 0 인 경우
ispng = true
또 다른
ispng = false
끝 If
엔드 기능
기능 isgif (fichero)
악기 (ucase (fichero), .gif) <> 0 인 경우
isgif = true
또 다른
isgif = false
끝 If
엔드 기능
함수 ISBMP (fichero)
악기 (ucase (fichero), .bmp) <> 0 인 경우
ISBMP = true
또 다른
ISBMP = false
끝 If
엔드 기능
기능 iswmf (fichero)
악기 (ucase (fichero), .wmf) <> 0 인 경우
iswmf = true
또 다른
iswmf = false
끝 If
엔드 기능
함수 iswebimg (f)
ISGIF (F) 또는 ISJPG (F) 또는 ISPNG (F) 또는 ISBMP (F) 또는 ISWMF (F) 인 경우
그 다음에
iswebimg = true
또 다른
iswebimg = true
끝 If
엔드 기능
기능 readimg (fichero)
iSgif (fichero)라면
readimg = readgif (fichero)
또 다른
ISJPG (Fichero)라면
readimg = readjpg (fichero)
또 다른
ISPNG (Fichero)라면
readimg = readpng (fichero)
또 다른
ISBMP (Fichero)라면
readimg = readpng (fichero)
또 다른
ISWMF (Fichero)라면
readimg = readwmf (fichero)
또 다른
readimg = 배열 (0,0)
끝 If
끝 If
끝 If
끝 If
끝 If
엔드 기능
기능 readjpg (fichero)
Dim fso, ts, s, hw, nbytes
hw = 배열 (,)
set fso = createobject (scripting.filesystemobject)
set ts = fso.opentextfile (server.mappath (/ & fichero), 1)
s = 오른쪽 (ts. Read (167), 4)
hw (0) = hextodec (hexat (s, 3) & hexat (s, 4))
hw (1) = hextodec (hexat (s, 1) & hexat (s, 2))
ts.close
readjpg = hw
엔드 기능
함수 readpng (fichero)
Dim fso, ts, s, hw, nbytes
hw = 배열 (,)