<%@ Language="VBScript" %>
<!--#include file="../config.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>Aurigma Image Uploader Demos &mdash; Watermark Demo</title>
	<link href="../common.css" type="text/css" rel="stylesheet" />

	<script type="text/javascript" src="../Scripts/iuembed.js"></script>

	<script type="text/javascript" src="../Scripts/iuembed.InstallationProgress.js"></script>

	<style type="text/css">
		.ScreenStyle
		{
			background-color: #ffffff;
			font-family: verdana;
			font-size: 11px;
			padding: 10px;
			text-align: center;
		}
	</style>

	<script type="text/javascript">
		//<![CDATA[
		function ImageUploader1_BeforeUpload() {
			var imageUploader1 = getImageUploader('ImageUploader1');

			//add additional form field
			imageUploader1.AddField('Author', 'Alex');
		}
		//]]>
	</script>

</head>
<body>
	<form>
	<h1>
		<a href="../default.asp">Aurigma Image Uploader Demos</a> &rarr; Watermark Demo</h1>
	<p>
		This demo application illustrates how to put watermarks on images uploaded with
		Image Uploader. It places the watermark image to the bottom right corner of the
		image.</p>
	<p>
		Additionally, in this demo you will see in action the following features:
	</p>
	<ul>
		<li>Ability to insert screenshots from clipboard to upload list (ActiveX only).</li>
		<li>Delete Selected button which deletes selected files.</li>
		<li>Upload of two thumbnails without original file (reduces upload size).</li>
		<li>File filter.</li>
		<li>Ability to send additional data in attached HTML form.</li>
	</ul>
	<div class="note">
		<h4>
			Note</h4>
		<p>
			This demo application <strong>deletes all previously uploaded files</strong>. Keep
			in mind that it is a feature of this demo, not of Image Uploader itself. If you
			<strong>do not want to delete uploaded files</strong>, you should modify the upload
			processing page specified by the <strong>Action</strong> parameter.
		</p>
	</div>
	<p>
		Watermark image&nbsp;<img id="Img1" src="../Images/Watermark.png" alt="watermark"
			style="vertical-align: bottom;" width="185px" height="33px" />
	</p>

	<script type="text/javascript">
		//<![CDATA[
		//Create JavaScript object that will embed Image Uploader to the page.
		var iu = new ImageUploaderWriter("ImageUploader1", 650, 500);

		//For ActiveX control full path to CAB file (including file name) should be specified.
		iu.activeXControlCodeBase = "../Scripts/ImageUploader6.cab";
		iu.activeXControlVersion = "6,5,35,0";

		//For Java applet only path to directory with JAR files should be specified (without file name).
		iu.javaAppletJarFileName = "ImageUploader6.jar";
		iu.javaAppletCodeBase = "../Scripts/";
		iu.javaAppletCached = true;
		iu.javaAppletVersion = "6.5.35.0";

		iu.showNonemptyResponse = "off";

		//Configure License Keys
		iu.addParam("LicenseKey", "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX;XXXXX-XXXXX-XXXXX-XXXXX-XXXXX");

		//Configure appearance and behaviour.
		iu.addParam("PaneLayout", "ThreePanes");
		iu.addParam("FolderView", "Thumbnails");
		iu.addParam("UploadView", "Thumbnails");
		iu.addParam("FolderPaneHeight", "220");
		iu.addParam("ShowDebugWindow", "true");
		iu.addParam("AllowRotate", "false");
		iu.addParam("ShowDescriptions", "false");
		iu.addParam("ShowUploadListButtons", "true");
		iu.addParam("BackgroundColor", "#ffffff");

		//Configure Paste button which will paste screenshots from a clipboard.
		iu.addParam("ButtonPasteText", "Paste Screenshot");
		//When a screenshot will be pasted from clipboard it will be named as 
		//Screenshot.jpg, next one - Screenshot_1.jpg, etc.
		iu.addParam("PasteFileNameTemplate", "Screenshot");

		//Make Delete button visible.
		iu.addParam("ButtonDeleteFilesText", "Delete Selected");

		//Configure file mask to display images only.
		iu.addParam("FileMask", "*.jpg;*.jpeg;*.jpe;*.gif;*.png;*.tif;*.tiff;*.psd");

		//Exclude the source file from the upload. Only thumbnails will be sent.
		iu.addParam("UploadSourceFile", "false");

		//Configure first thumbnail (large image the watermark will be applied to).
		iu.addParam("UploadThumbnail1FitMode", "ActualSize");

		//Configure watermark
		iu.addParam("UploadThumbnail1Watermark", "opacity=100;ImageUrl=../Images/Watermark.png;ImageWidth=155;ImageHeight=30;Position=BottomRight;");

		//Configure second thumbnail (small preview).
		iu.addParam("UploadThumbnail2FitMode", "Fit");
		iu.addParam("UploadThumbnail2Width", "120");
		iu.addParam("UploadThumbnail2Height", "120");
		iu.addParam("UploadThumbnail2JpegQuality", "60");

		//Configure URL files are uploaded to.
		iu.addParam("Action", "upload.asp");

		//Configure URL where to redirect after upload.
		iu.addParam("RedirectUrl", "gallery.asp");

		//Add event handler.
		iu.addEventListener("BeforeUpload", "ImageUploader1_BeforeUpload");

		//Create installation progress.
		var ip = new InstallationProgressExtender(iu);
		ip.setProgressImageUrl("../Scripts/InstallationProgress.gif");
		ip.setProgressCssClass("ScreenStyle");
		ip.setInstructionsCssClass("ScreenStyle");

		//Tell Image Uploader writer object to generate all necessary HTML code to embed
		//Image Uploader to the page.
		iu.writeHtml();
		//]]>
	</script>

	</form>
</body>
</html>
<!--END-->