<%
IMG_file = server.mappath(".") & "\box.jpg"
imag_size = ImgFunction(IMG_file)
imag_size = Split(imag_size,",")
response.write ("넓이 " & imag_size(0))
response.write "<br>"
response.write ("높이 " & imag_size(1))
%>
---------------------------------------------------
출력화면
넓이 213
높이 114
--------------------------------------------------------
<%
Function ImgFunction(IMG_file)
Const limitWidth=600
dim orgWidth,orgHeight
dim newWidth,newHeight
Set objImg = LoadPicture(IMG_file)
orgWidth = cint(objImg.Width * 24 / 635)
orgHeight = cint(objImg.Height * 24 / 635)
if limitWidth < orgWidth then
newWidth = limitWidth
newHeight = orgHeight * (limitWidth / orgWidth)
else
newWidth = orgWidth
newHeight = orgHeight
End if
ImgFunction = orgWidth & "," & orgHeight
End Function
%>
자바스크립트
var img = new Image()
img.src="경로";
alert(img.width);
'WEB > ASP / DotNet' 카테고리의 다른 글
| ADO/ASP를 이용하여 데이터를 FlexGrid에 나타내는 방법 (0) | 2007/06/07 |
|---|---|
| MSSQL-2000 전체 텍스트 검색을 사용하여 웹을 검색 (0) | 2007/06/07 |
| 이미지 넓이, 높이 알아내기 (0) | 2007/06/07 |
| ServerVariables 컬렉션은 (0) | 2007/06/07 |
| ActiveX 링크 (0) | 2007/06/07 |
| 블로그 XML RSS 구현 (WINDOWS+IIS+ASP환경) (0) | 2007/06/07 |




최근에 달린 댓글
링크
최근에 받은 트랙백
태그목록