下面两个文件:
<! - #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 Height =&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)
If strust(ucase(fichero)、.jpg)<> 0 then
isjpg = true
それ以外
isjpg = false
ifを終了します
エンド関数
関数ISPNG(Fichero)
If strust(ucase(fichero)、.png)<> 0 then
ispng = true
それ以外
ispng = false
ifを終了します
エンド関数
関数isgif(fichero)
If strust(ucase(fichero)、.gif)<> 0 then
isgif = true
それ以外
isgif = false
ifを終了します
エンド関数
関数ISBMP(fichero)
If strust(ucase(fichero)、.bmp)<> 0 then
ISBMP = true
それ以外
ISBMP = false
ifを終了します
エンド関数
関数ISWMF(Fichero)
If strust(ucase(fichero)、.wmf)<> 0 then
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 = array(0,0)
ifを終了します
ifを終了します
ifを終了します
ifを終了します
ifを終了します
エンド関数
関数readjpg(fichero)
dim fso、ts、s、hw、nbytes
hw = array(、)
fso = createObject(scripting.filesystemObject)をset
ts = fso.opentextfile(server.mappath(/&fichero)、1)を設定
s = right(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 = array(、)