欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

vbs下用Shell.Application獲取圖片分辨率

 更新時(shí)間:2011年01月21日 23:41:05   作者:  
昨天有人在博客里留言:獲取圖片分辨率也可以用Shell.Application,我比較喜歡用這個(gè)。
簡單Google了一下,未果,于是發(fā)郵件請教了一下,很快就有了回復(fù)。
復(fù)制代碼 代碼如下:

Path = "C:\test.jpg"
arr = Split(Path,"\")
FileName = arr(Ubound(arr))
FolderPath = Left(Path, Len(Path) - Len(FileName) - 1)
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(FolderPath)
set objFolderItem = objFolder.ParseName(FileName)
Width = objFolder.GetDetailsOf(objFolderItem, 162)
Height = objFolder.GetDetailsOf(objFolderItem, 164)
Msgbox "Width: " & Width & " Height: " & Height

原文:http://demon.tw/programming/shell-application-picture-resolution.html

相關(guān)文章

最新評(píng)論