<% Dim imgArray(10,1), iw, ih, iwidth, iheight, isize, isizekb, isASPJpeg, Jpeg iwidth = Application("Classify_Main_Config" & strUnique)(23) iheight = Application("Classify_Main_Config" & strUnique)(24) isize = Application("Classify_Main_Config" & strUnique)(25) isizekb = isize*1000 On Error Resume Next Set Jpeg = Server.CreateObject("Persits.Jpeg") If err.number = 0 then If CDate(Jpeg.Expires) > Now then isASPJpeg = True End If sendImage Sub sendImage() Response.Write "
" Server.ScriptTimeout=200 Select Case isASPJpeg '### If image dimensions exceeded the maximum allowed, image will be resized with ASPJpeg '### component (if installed and available on web server). Case True Set UploadImg = New FreeASPUpload UploadImg.Save uploadPath, false, 10000000 Select Case UploadImg.imageStatus Case "oversize" session("constrain" & strSUnique) = Empty Response.Write "
" & strText_Thesizeisgreater & 10 & "mb. " & strText_Pleaseselectanother & "
" & msgBack Response.Write "" Case "notimage" session("constrain" & strSUnique) = Empty Response.Write "
" & strText_imagesareallowed & "
" & msgBack Response.Write "" Case "bannerexists" Case Else FileName = UploadImg.FileToSave Set UploadImg = Nothing %> <% set_w = iwidth set_h = iheight With Jpeg .Open uploadPath & "\" & FileName original_w = .OriginalWidth original_h = .OriginalHeight If original_w > set_w Then new_h = Round(set_w * original_h / original_w) original_h = new_h original_w = set_w End If If original_h > set_h Then new_w = Round(set_h * original_w / original_h) original_w = new_w original_h = set_h End If .Width = original_w .Height = original_h If Display_text then .Canvas.Font.ShadowXOffset = Shadow_XOffset .Canvas.Font.ShadowYOffset = Shadow_YOffset .Canvas.Font.Bold = isFont_Bold .Canvas.Font.Underlined = isFont_Underlined .Canvas.Font.Italic = isFont_Italic .Canvas.Font.ShadowColor = Shadow_Color .Canvas.Font.Color = Font_Color .Canvas.Font.Size = Font_Size .Canvas.Font.Family = Font_Family .Canvas.Print 5 , .Height - 15, Text_Over End If .Quality = Image_Quality .Save uploadPath & "\" & FileName End With Set Jpeg = Nothing %>
<%= strText_ImagePreview %>


<% End Select '### If ASPJpeg is not installed on web server image dimensions compared to maximum allowed. '### Client will be prompted to select a different image if dimension limit exceeded. Case Else Set UploadImg = New FreeASPUpload UploadImg.Save uploadPath, false, isizekb Select Case UploadImg.imageStatus Case "oversize" session("constrain" & strSUnique) = Empty Response.Write "
" & strText_Thesizeisgreater & isize & "kb. " & strText_Pleaseselectanother & "
" & msgBack Response.Write "" Case "notimage" session("constrain" & strSUnique) = Empty Response.Write "
" & strText_imagesareallowed & "
" & msgBack Response.Write "" Case "bannerexists" Case Else FileName = UploadImg.FileToSave %>
<%= strText_ImagePreview %>


<% End Select End Select Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "
" End Sub On Error Goto 0 %>