Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - HELP ME ABOUT ASPJPEG components Watermark
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

HELP ME ABOUT ASPJPEG components Watermark

 Post Reply Post Reply
Author
Chirs View Drop Down
Newbie
Newbie


Joined: 11 August 2008
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote Chirs Quote  Post ReplyReply Direct Link To This Post Topic: HELP ME ABOUT ASPJPEG components Watermark
    Posted: 07 October 2008 at 9:31am

<% @ Language=VBScript %>
<% Option Explicit %>
<!--#include file="common.asp" -->
<!--#include file="RTE_configuration/RTE_setup.asp" -->
<!--#include file="functions/functions_upload.asp" -->
<!--#include file="functions/functions_date_time_format.asp" -->
<%
'****************************************************************************************
'**  Copyright Notice   
'**
'**  Web Wiz Forums
'**  http://www.webwizforums.com
'**                                                             
'**  Copyright ?001-2007 Web Wiz. All Rights Reserved.  
'** 
'**  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS UNDER LICENSE FROM 'WEB WIZ'.
'** 
'**  IF YOU DO NOT AGREE TO THE LICENSE AGREEMENT THEN 'WEB WIZ' IS UNWILLING TO LICENSE
'**  THE SOFTWARE TO YOU, AND YOU SHOULD DESTROY ALL COPIES YOU HOLD OF 'WEB WIZ' SOFTWARE
'**  AND DERIVATIVE WORKS IMMEDIATELY.
'** 
'**  If you have not received a copy of the license with this work then a copy of the latest
'**  license contract can be found at:-
'**
'**  http://www.webwiz.net/license
'**
'**  For more information about this software and for licensing information please contact
'**  'Web Wiz' at the address and website below:-
'**
'**  Web Wiz, Unit 10E, Dawkins Road Industrial Estate, Poole, Dorset, BH15 4JD, England
'**  http://www.webwiz.net
'**
'**  Removal or modification of this copyright notice will violate the license contract.
'**
'****************************************************************************************

 

'*************************** SOFTWARE AND CODE MODIFICATIONS ****************************
'**
'** MODIFICATION OF THE FREE EDITIONS OF THIS SOFTWARE IS A VIOLATION OF THE LICENSE 
'** AGREEMENT AND IS STRICTLY PROHIBITED
'**
'** If you wish to modify any part of this software a license must be purchased
'**
'****************************************************************************************

 


'Set the timeout of the page
Server.ScriptTimeout =  1000


'Set the response buffer to true as we maybe redirecting
Response.Buffer = True

 

'Intiliase variables
blnExtensionOK = True
strUploadFilePath = strUploadFilePath


'read in the forum ID and message box type
intForumID = CInt(getSessionItem("FID"))


'Check the user is welcome in this forum
Call forumPermissions(intForumID, intGroupID)


'If the user is user is using a banned IP redirect to an error page
If bannedIP() OR blnBanned OR blnImageUpload = false OR blnRead = false OR (blnPost = false AND blnReply = false) Then
 
 'Clean up
 Call closeDatabase()

 'Redirect
 Response.Redirect("insufficient_permission.asp" & strQsSID1)
End If

 


'Read in the file types that can be uploaded
If blnImageUpload AND blnRead AND (blnPost OR blnReply) Then
 
 'If this is a post back then upload the image
 If Request.QueryString("PB") = "Y" Then
 
 
  'Call upoload file function
  strImageName = fileUpload("image")
  
  
  Dim Jpeg
  ' 建立实例
  Set Jpeg = Server.CreateObject("Persits.Jpeg")
  ' 打开目标图片
  Jpeg.Open Server.MapPath(strUploadFilePath&"/"& strImageName )
  
  ' 添加文字水印
  Jpeg.Canvas.Font.Color = &HFF0000' 红色
  Jpeg.Canvas.Font.Family = "宋体"
  Jpeg.Canvas.Font.Bold = True
  Jpeg.Canvas.Print 10, 10, "123456"
  ' 打印坐标x 打印坐标y 需要打印的字符
  '以下是对图片进行边框处理
  Jpeg.Canvas.Pen.Color = &H000000'' black 颜色
  Jpeg.Canvas.Pen.Width = 2 '画笔宽度
  Jpeg.Canvas.Brush.Solid = False '是否加粗处理
  Jpeg.Canvas.Bar 1, 1, Jpeg.Width, Jpeg.Height
  '起始X坐标 起始Y坐标 输入长度 输入高度

 
  ' 保存文件
  Jpeg.Open Server.MapPath(strUploadFilePath&"/"& strImageName )
  
  ' 注销对象
  Set Jpeg = Nothing  
   
  

  

 
 End If
End If

 

 

 

 

'Reset Server Objects
Call closeDatabase()

%>
<!-- #include file="includes/browser_page_encoding_inc.asp" -->
<meta name="generator" content="Web Wiz Forums" />
<title>Image Upload</title>

<%
'***** START WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ******
Response.Write(vbCrLf & "<!--//" & _
vbCrLf & "/* *******************************************************" & _
vbCrLf & "Software: Web Wiz Rich Text Editor ver. " & strRTEversion & "" & _
vbCrLf & "Info: http://www.richtexteditor.org" & _
vbCrLf & "Copyright: (C)2001-2007 Web Wiz. All rights reserved" & _
vbCrLf & "******************************************************* */" & _
vbCrLf & "//-->")
'***** END WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ******
%>

<script  language="JavaScript">
<%
'If the image has been saved then place it in the post
If lngErrorFileSize = 0 AND blnExtensionOK = True AND blnFileSpaceExceeded = False AND blnFileExists = False AND strImageName <> "" Then
%>
 window.opener.document.getElementById('message').focus();
 window.opener.document.getElementById('message').value += '

';
 /*window.opener.document.getElementById('uploads').value += '<% = strImageName %>;';*/
 window.close();
 
<%
End If
%>
</script>
<style type="text/css">
<!--
html, body {
  background: ButtonFace;
  color: ButtonText;
  font: font-family: Verdana, Arial, Helvetica, sans-serif;
  font-size: 12px;
  margin: 2px;
  padding: 4px;
}
.text {
 font-family: Verdana, Arial, Helvetica, sans-serif;
 font-size: 12px;
 color: #000000;
}
.error {
 font-family: Verdana, Arial, Helvetica, sans-serif;
 font-size: 12px;
 color: #FF0000;
}
legend {
 font-family: Arial, Helvetica, sans-serif;
 font-size: 12px;
 color: #0000FF;
}
-->
</style>
</head>
<body OnLoad="self.focus(); document.forms.frmImageUp.Submit.disabled=true;">
<%

'If the user is allowed to upload then show them the form
If blnImageUpload AND blnRead AND (blnPost OR blnReply) Then 

%>
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="0">
 <form action="non_RTE_upload_images.asp?PB=Y<% = strQsSID2 %>" method="post" enctype="multipart

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.