网站制作学习网ASP→正文:获得图片大小
字体:

获得图片大小

ASP 2008/9/25 22:25:52  点击:不统计

关键词:获得图片大小,asp获得图片大小,asp获得图片属性



<%

set obj=server.CreateObject("wsImage.Resize") ''调用组件

obj.LoadSoucePic server.mappath("25.jpg") ''打开图片,图片名字是25.jpg

obj.GetSourceInfo iWidth,iHeight

response.write "图片宽度:" & iWidth & "<br>" ''获得图片宽度

response.write "图片高度:" & iHeight & "<br>" ''获得图片高度

strError=obj.errorinfo

if strError<>"" then

response.write obj.errorinfo

end if

obj.free

set obj=nothing

%>

·上一篇:验证字符串中是否包含有效字符 >>    ·下一篇:添加文字水印 >>
推荐文章
最新文章