'세로'에 해당되는 글 1건
- 2008.11.17 vb 이미지를 불러와 가로, 세로크기를 구한다.
' ---------------------------------------------------
' 이미지를 불러와 가로, 세로크기를 구한다.
' ---------------------------------------------------
function getImageSize(imgPath)
Dim pic, picWH(1)
' LoadPicture를 지원하지 않는 서버가 있는데..
' 이유는 모르겠다.
On Error Resume Next
set pic = LoadPicture(imgPath)
if Err.Number > 0 then
response.write err.number & ": " & err.description
picWH(0) = 500 ' set default value
picWh(1) = 500
getImageSize = picWH
exit function
end if
picWH(0) = CLng(CDbl(pic.Width) * 24 / 635)
picWH(1) = CLng(CDbl(pic.Height) * 24 / 635)
set pic = nothing
getImageSize = picWH
end function