일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
- ajax
- readonly
- println
- replace
- disabled
- Getrows
- 커널
- RTL88x2BU
- jQuery
- 따라다니는 배너
- synology
- 크로스 컴파일
- submit
- 무선랜카드
- ASP
- jquery 레이어
- javascript
- euc-kr
- lsusb
- XMLHTTP
- form
- FileSystemObject
- SQL Injection
- DS718+
- include
- 시놀로지
- utf-8
- PHP GCM
- AC1300
- Injection
- Today
- Total
아는 것이 좋은 것이다.
[ASP] 이미지 리사이즈 본문
'사용법 : Resize_Img(이미지경로, 가로최대, 세로최대)
Function Resize_Img(imgPath, maxWidth, maxHeight)
Dim objImg
Set objImg = LoadPicture(imgPath)
Dim imgWidth : imgWidth = Cint(objImg.Width * 24 / 635) '이미지 Width
Dim imgHeight : imgHeight = Cint(objImg.Height * 24 / 635) '이미지 Height
Dim reWidth, reHeight
If imgWidth > maxWidth Or imgHeight > maxHeight Then
If imgWidth > imgHeight Then
reWidth = maxWidth
reHeight = Int((imgHeight * reWidth) / imgWidth)
Else
reHeight = maxHeight
reWidth = Int((reHeight * imgWidth) / imgHeight)
End If
Else
reWidth = imgWidth
reHeight = imgHeight
End If
Set objImg = Nothing
Resize_Img = reWidth & "/" & reHeight
End Function
'ASP' 카테고리의 다른 글
[ASP] 이미지 가져오기(참고) (0) | 2014.04.24 |
---|---|
[ASP] 배너 카운트 처리 (0) | 2014.04.24 |
[ASP] 파일을 DB에 업로드, 다운로드 하기(참고용) (0) | 2014.04.24 |
[ASP] DB에 있는 이미지 다운로드 (0) | 2014.04.24 |
[ASP] 기본 필수 함수 (0) | 2014.04.24 |