:
<! - # Inclure virtual = / Intels / ChunFeng / GraphicDetect.asp ->
<html>
<adal>
<Title> 图像尺寸 </TITAL>
</ head>
<corps bgcolor = # ffffff>
<%
graphique = images / Intels.gif
Hw = relemg (graphique)
Response.Write Graphic & Dimensions: & hw (0) & x & hw (1)
& <br>
réponse.Write <img src = / & graphic &
Response.Write Height = & hw (0) &
Response.write width = & hw (0) &>
%>
</docy>
</html>
------------------------
graphicdetect.asp
<%
Sombre hw
Fonction Ascat (S, N)
ASCAT = ASC (Mid (S, N, 1))
Fonction finale
Fonction hexat (s, n)
Hexat = hex (ascat (s, n))
Fonction finale
Fonction isjpg (fichero)
Si instr (ucase (fichero), .jpg) <> 0 alors
isjpg = true
Autre
isjpg = false
Terminer si
Fonction finale
Fonction ISPNG (Fichero)
Si instr (ucase (fichero), .png) <> 0 alors
ispng = true
Autre
ispng = false
Terminer si
Fonction finale
Fonction isgif (fichero)
Si instr (ucase (fichero), .gif) <> 0 alors
isgif = true
Autre
isgif = false
Terminer si
Fonction finale
Fonction ISBMP (Fichero)
Si instr (ucase (fichero), .bmp) <> 0 alors
isBMP = true
Autre
ISBMP = faux
Terminer si
Fonction finale
Fonction ISWMF (Fichero)
Si instr (ucase (fichero), .wmf) <> 0 alors
ISWMF = True
Autre
ISWMF = faux
Terminer si
Fonction finale
Fonction iswebimg (f)
Si ISGIF (F) ou ISJPG (F) ou ISPNG (F) ou ISBMP (F) ou ISWMF (F)
Alors
isWebimg = true
Autre
isWebimg = true
Terminer si
Fonction finale
Fonction Lelimg (Fichero)
Si isgif (Fichero) alors
Relemg = readgif (fichero)
Autre
Si ISJPG (Fichero) alors
Lelimg = redjpg (fichero)
Autre
Si Ispng (Fichero) alors
Relemg = readpng (fichero)
Autre
Si ISBMP (Fichero) alors
Relemg = readpng (fichero)
Autre
Si ISWMF (Fichero) alors
Relemg = readwmf (fichero)
Autre
Lelimg = array (0,0)
Terminer si
Terminer si
Terminer si
Terminer si
Terminer si
Fonction finale
Fonction Readjpg (Fichero)
DIM FSO, TS, S, HW, NBYTES
HW = Array (,)
Set fso = createObject (scripting.fileSystemObject)
Set ts = fso.opentextfile (server.mappath (/ & fichero), 1)
S = à droite (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
Fonction finale
Fonction Readpng (Fichero)
DIM FSO, TS, S, HW, NBYTES
HW = Array (,)