This documentation is for the old version. Go to the latest Graphics Mill docs

Web Controls Samples

This section contains information about Graphics Mill for .NET code samples of Web applications.

Source codes of all the samples can be downloaded at the following URL:

http://forums.aurigma.com/yaf_postst3045_Web-Demos-Bundle-photo-cropping-TIFF-viewer-red-eye-removal-and-business-card-editor.aspx

If you want to deploy the samples on the server, you should install them manually. To do that, follow these steps:

  1. Copy either GraphicsMillAjaxCS or GraphicsMillAjaxVB folder to some directory on the Web server where you are going to test the samples.
  2. Create a new virtual directory in IIS which is mapped to the folder where you have copied the files:
    1. Open the IIS Manager snap-in (Start -> Control Panel -> Administrative Tools -> Internet Information Services).
    2. Select your Web site in the console tree and right-click it to open a context menu.
    3. Choose New -> Virtual Directory....
    4. Follow the Virtual Directory Creation Wizard instructions:
      1. As an alias, specify the desired name, for example GraphicsMillAjaxCS. Remember that this name will be a part of the URL.
      2. As a content directory, specify the full path to the folder with the sample files you copied to the server.
  3. Copy the client scripts of Graphics Mill for .NET to your Web server. You can find them in the aspnet_client\graphics_mill\5_x_x subfolder inside the Graphics Mill for .NET installation folder. Paste the scripts to the aspnet_client\graphics_mill\5_x_x folder relative the root of your site (replace 5_x_x with the actual version number of your copy of Graphics Mill for .NET).
  4. Configure the file cache which is stored in the /PublicCache and /PrivateCache folders of the code sample folder. To configure the cache, follow these steps:
    1. Set the modify permission for these folders in the file system for the following accounts:
      • IUSR_<machinename> and ASPNET accounts, if you run the server on Windows NT/2000/XP.
      • NETWORK SERVICE group, if you run the server on Windows 2003.
    2. Deny script excution for these folders:
      1. Open the Internet Information Services Management Console.
      2. Locate the cache folders in the site tree.
      3. Right-click the necessary folder and choose Properties.
      4. Ot the Directory tab, find the Execute Permissions dropdown list and choose None.
    3. Check the RelativePublicCachePath and RelativePrivateCachePath keys in Web.config of the samples so that they mapped to the correct folders. To do that:
      • Find the Aurigma.GraphicsMill.AjaxControls section inside the configSections element of Web.config.
      • Verify the paths in the following keys:
        • ClientScriptsLocation—a virtual path to the client scripts of Graphics Mill for .NET.
        • RelativePrivateCachePath—a virtual path to the private cache folder.
        • RelativePublicCachePath—a virtual path to the public cache folder.

To run the manually installed samples, type the URL of the code sample folder in the browser. For more details about using Web controls, see the Quick Start section of this manual.

Using Graphics Mill Without Web Controls

This is a simplest sample that demonstrates how to use Graphics Mill for .NET class library in ASP.NET applications without using its Web Controls. It just applies a selected effect to the image and displays both the original and the modified images on the same page.

Required add-ons
This sample does not require any add-ons

Applying Effects

This sample demonstrates how to use Web Controls shipped with Graphics Mill for .NET in applications which are built with the Visual Studio designer. It shows how to display an image in the BitmapViewer control, how to zoom and pan a bitmap, select a rectangular region of the bitmap and apply some effects.

Required add-ons
This sample does not require any add-ons

Photo Cropping

This sample demonstrates how to build an application using the remote scripting approach, also known as AJAX. This approach allows calling methods at the server directly from JavaScript. This makes the application work faster. As the "Applying Effects" demo, it shows how to use the BitmapViewer control and rubberbands.

Required add-ons
This sample does not require any add-ons

TIFF Viewer

This sample demonstrates how to create an online TIFF viewer. Using this application the user can open multipage TIFF documents, for example, faxes. It also provides such viewer functionality as navigation through pages and page zoom.

There is also a Windows version of this demo. You can read about it in the Windows Controls Samples topic.

Required add-ons
This sample does not require any add-ons

Red Eye Removal

This is a demonstration of usage of Red-Eye Removal for Web applications. It shows how this add-on works in a semiautomatic mode as well as in a manual one. The application is designed as a wizard. You can read more about Red-Eye Removal in the Red-Eye Removal section.

There is also a Windows version of this demo. You can read about it in the Windows Controls Samples topic.

Required add-ons
Red-Eye Removal

Online Business Card Editor

This sample demonstrates how to build a Web application for online editing of business cards. This application uses Advanced PSD Add-on for Graphics Mill, as the card template is stored as a PSD file. You can read more about Advanced PSD Add-on in the Advanced PSD Add-on section.

Required add-ons
Advanced PSD Add-on

Printing Demo

This demo shows how to print image from a web browser.

Required add-ons
This sample does not require any add-ons

Gift Editor

This sample demonstrates how to use AJAX Vector Objects module for online personalizing gifts. You can read more about this demo application in the Gift Editor Demo Overview topic.

Required add-ons
This sample does not require any add-ons

See Also

Reference

Manual