脚本:
dim pic
path="E:\Source\Expert\bin\CaptureImage\Live\20110316-140234.933.jpg"
arr=split(path,"\")
Filename=arr(UBound(arr)) 'ubound获取数组的最大的那个可用下标
PicPath=Left(path,Len(path)-len(Filename)-1) '图片所在的文件夹
Set objShell=CreateObject("Shell.Application") '创建图像对象
Set objFolder=objShell.namespace( PicPath) '文件夹赋值
Set objFolderItem=objFolder.parseName(Filename) '指定图片
width=objFolder.GetDetailsOf(objFolderItem,162)
hight=objFolder.GetDetailsOf(objFolderItem,164)
msgbox "width:" & width & "&" & "hight" & hight
结果: