獲得圖片大小

字號:


    關(guān)鍵詞:獲得圖片大小,asp獲得圖片大小,asp獲得圖片屬性
    <%
    set obj=server.CreateObject("wsImage.Resize") ''調(diào)用組件
    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
    %>