< %@ Language=VBScript %>
< %
Dim UploadPath
Dim UploadPathWaterMark
Dim UploadPathThumbnail
Dim FilePath
Dim FilePath1
set uploadform=server.CreateObject("DEXT.FileUpload")
uploadform.DefaultPath="C:\Temp"
''원본 업로드(1)
UploadPath = uploadform("file").Save
Response.Write("Save as Source Image:" & UploadPath & "
")
set objImage =server.CreateObject("DEXT.ImageProc")
if true = objImage.SetSourceFile(UploadPath) then
''FileNameWithoutExt 속성은 업로드한 파일의 이름을 리턴한다.(확장자 제외)
SourceFileName = uploadform("file").FileNameWithoutExt
FilePath = "C:\Temp\" & SourceFileName & "(WaterMark).jpg"
FilePath1 = "C:\Temp\" & SourceFileName & "(Thumbnail).jpg"
''워터마크 처리(2)
UploadPathWaterMark = objImage.SaveAsWatermarkImage("/DEXTUploadProSamples/Image/WaterMark/watermark.bmp",FilePath,-10,-10,false)
Response.Write("Save as Watermark Image: " & UploadPathWaterMark & "
")
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 & "
")
end if
%>
< %
set objImage = nothing
Set uploadform =nothing
%>
Posted by 홍반장