下面两个文件:
<!-#รวม virtual =/intels/chunfeng/graphicdetect.asp->
<html>
<head>
<title> 图像尺寸 </title>
</head>
<body bgcolor =#ffffff>
-
graphic = images/intels.gif
hw = readimg (กราฟิก)
Response.write กราฟิกและมิติ: & HW (0) & X & HW (1)
& <br>
response.write <img src =/ & กราฟิก &
Response.write ความสูง = & hw (0) &
response.write width = & hw (0) &>
-
</body>
</html>
-
graphicdetect.asp
-
สลัว HW
ฟังก์ชั่น ascat (s, n)
ascat = asc (mid (s, n, 1))
ฟังก์ชันสิ้นสุด
ฟังก์ชั่น hexat (s, n)
hexat = hex (ascat (s, n))
ฟังก์ชันสิ้นสุด
ฟังก์ชั่น ISJPG (fichero)
ถ้า instr (ucase (fichero), .jpg) <> 0 แล้ว
isjpg = true
อื่น
ISJPG = FALSE
สิ้นสุดถ้า
ฟังก์ชันสิ้นสุด
ฟังก์ชั่น ispng (fichero)
ถ้า instr (ucase (fichero), .png) <> 0 แล้ว
ispng = true
อื่น
ispng = false
สิ้นสุดถ้า
ฟังก์ชันสิ้นสุด
ฟังก์ชัน ISGIF (Fichero)
ถ้า instr (ucase (fichero), .gif) <> 0 แล้ว
isgif = true
อื่น
ISGIF = FALSE
สิ้นสุดถ้า
ฟังก์ชันสิ้นสุด
ฟังก์ชั่น ISBMP (Fichero)
ถ้า instr (ucase (fichero), .bmp) <> 0 แล้ว
isbmp = true
อื่น
ISBMP = FALSE
สิ้นสุดถ้า
ฟังก์ชันสิ้นสุด
ฟังก์ชั่น ISWMF (Fichero)
ถ้า instr (ucase (fichero), .wmf) <> 0 แล้ว
iswmf = true
อื่น
ISWMF = FALSE
สิ้นสุดถ้า
ฟังก์ชันสิ้นสุด
ฟังก์ชั่น iswebimg (f)
ถ้า ISGIF (F) หรือ ISJPG (F) หรือ ISPNG (F) หรือ ISBMP (F) หรือ ISWMF (F)
แล้ว
iswebimg = true
อื่น
iswebimg = true
สิ้นสุดถ้า
ฟังก์ชันสิ้นสุด
ฟังก์ชั่น 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 = array (0,0)
สิ้นสุดถ้า
สิ้นสุดถ้า
สิ้นสุดถ้า
สิ้นสุดถ้า
สิ้นสุดถ้า
ฟังก์ชันสิ้นสุด
ฟังก์ชั่น readjpg (fichero)
Dim FSO, TS, S, HW, NBYTES
hw = อาร์เรย์ (,)
ตั้งค่า fso = createObject (scripting.filesystemobject)
ตั้งค่า 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 = อาร์เรย์ (,)