<%@ Language=VBScript %>
<%
Dim UpPath, fPath(1), fSize(1), tmp
Dim fWaterMark, fThumbnail, SourceFileName

Set QueryForm = Server.CreateObject("DEXT.FileUpload")
QueryForm.DefaultPath = "C:\Temp"

' 원본 업로드
UpPath = QueryForm("file").Save
response.write "Save as Source Image:"& UpPath


Set objImage = Server.CreateObject("DEXT.ImageProc")

if objImage.SetSourceFile(UpPath) = True then
' FileNameWithoutExt 속성은 업로드한 파일의 이름을 리턴한다.(확장자 제외)
tmp = "/DEXTUploadProSamples/Image/WaterMark/watermark.bmp"
SourceFileName = QueryForm("file").FileNameWithoutExt

fPath(0) = "C:\Temp\"& SourceFileName &"(WaterMark).jpg"
fPath(1) = "C:\Temp\"& SourceFileName &"(Thumbnail).jpg"

' 워터마크 처리
fWaterMark = objImage.SaveAsWatermarkImage(tmp,fPath(0),-10,-10,false)
response.write "Save as Watermark Image: "& fWaterMark
end if

if objImage.SetSourceFile(fWaterMark) = True then
' 워터마킹 처리 된 이미지로 썸네일 처리 한다.
fSize(0) = objImage.ImageWidth / 2
fSize(1) = objImage.ImageHeight / 2
fThumbnail = objImage.SaveasThumbnail(fPath(1),fSize(0),fSize(1),false)
response.write "Save as Thumbnail: "& fThumbnail
end if

Set objImage = Nothing
Set QueryForm = Nothing
%>
2011/10/10 14:52 2011/10/10 14:52

Trackback Address :: 이 글에는 트랙백을 보낼 수 없습니다