아래 예제코드를 참고하시기 바랍니다.
<%@ Language=VBScript %>
<%
Dim UploadPath
Dim UploadPathWaterMark
Dim UploadPathThumbnail
Dim FilePath
Dim FilePath1
set uploadform=server.CreateObject("DEXT.FileUpload")
uploadform.DefaultPath="C:\Temp"
UploadPath = uploadform("file").Save '(1)원본 업로드
Response.Write("Save as Source Image:" & UploadPath & "<br>")
set objImage =server.CreateObject("DEXT.ImageProc")
'FileNameWithoutExt 속성은 업로드 한 파일의 이름을 리턴 한다.(확장 자 제외)
if true = objImage.SetSourceFile(UploadPath) then
SourceFileName = uploadform("file").FileNameWithoutExt
FilePath = "C:\Temp\" & SourceFileName & "(WaterMark).jpg"
FilePath1 = "C:\Temp\" & SourceFileName & "(Thumbnail).jpg"
UploadPathWaterMark = objImage.SaveAsWatermarkImage("/DEXTUploadProSamples/Image/WaterMark/watermark.bmp"
,FilePath,-10,-10,false) '(2)워터마크 처리
Response.Write("Save as Watermark Image: " & UploadPathWaterMark & "<br>")
end if
if true = objImage.SetSourceFile(UploadPathWaterMark) then
'(3)워터마킹 처리 된 이미지로 썸네일 처리
UploadPathThumbnail = objImage.SaveasThumbnail(FilePath1, objImage.ImageWidth/2, objImage.ImageHeight/2, false)
Response.Write("Save as Thumbnail: " & UploadPathThumbnail & "<br>")
end if
%>
<HTML><BODY> </BODY></HTML>
<%
set objImage = nothing
Set uploadform =nothing
%> |