我爱Aspx >> Asp.Net >> 通过Adodb.Stream取得图像(BMP JPG PNG GIF SWF)的高度和宽度ret(2)=int(abs(Str2Num(mid(sConv,3*nBits+1,nBits),2)-Str2Num(mid(sConv,2*nBits+1,nBits),2))/20)
case "FFD8FF":
do
do: p1=binVal(aso.Read(1)): loop while p1=255 and not aso.EOS
if p1>191 and p1<196 then exit do else aso.read(binval2(aso.Read(2))-2)
do:p1=binVal(aso.Read(1)):loop while p1<255 and not aso.EOS
loop while true
aso.Read(3)
ret(0)="JPG"
ret(2)=binval2(aso.Read(2))
ret(1)=binval2(aso.Read(2))
case else:
if left(Bin2Str(bFlag),2)="BM" then
aso.Read(15)
ret(0)="BMP"
ret(1)=binval(aso.Read(4))
ret(2)=binval(aso.Read(4))
else
ret(0)=""
end if
end select
ret(3)="width=""" & ret(1) &""" height=""" & ret(2) &""""
getimagesize=ret
End Function
End Class
使用范例(读某目录下所有图片的宽度):
set qswh=new qswhImg
Ҷƪл˵?
让自定义文件下载支持断点续传(..[05-20]
根据需要动态include不同的文件[05-20]
利用xml数据岛实现多级关联下拉选..[05-20]
自制Pop3邮件接收系统(二):利..[05-20]
自制Pop3邮件接收系统(一):利..[05-20]
纠正:HashPasswordForStoringIn..[05-20]
Calendar如何只显示“一、二、三..[05-20]
利用SharpZipLib实现实时zip压缩..[05-20]
用regRange轻易实现特定数字范围..[05-20]
EnableViewState="false..[05-20]