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

Web Imaging Applications

When you are creating an ASP.NET imaging application, and need to provide the user with an image browser or editor, Graphics Mill for .NET may be extremely helpful. It provides special web controls which enable you to create a web image editor as easily as in a Windows application.

Web-optimized Viewport Control

The powerful scrollable image viewer web control implements smart AJAX-based load-by-demand scheme when displaying images, i.e.:

  • Only the visible part of the image is cropped and downloaded;
  • If some part of image has already been downloaded, it is cached at the client. When the user scrolls to this part, it is displayed immediately;
  • If some portion of the image displayed at the viewport has already been cached, only the absent part of image is downloaded;
  • While a portion of image is being downloaded to the viewport, low-quality version is displayed (see the screenshot). This makes the image easier to navigate.

    Load-by-demand screenshot

This control enables the user to not only scroll the image, but also zoom it. The following zooming features are available:

  • Manual zooming (by mouse wheel or modifying appropriate property of the control);
  • Automatic zooming including such modes as "fit to page" (fit entire image in the control), "fit to width" (fit the image in the control width), etc;
  • Several quality modes for zoom in/out display. Supports scale-to-gray resize technique for bitone images (makes such images look smooth and prevents the text from being unreadable);

It also supports the rubber-band rectangular selection which can be either free-hand, or have fixed proportions. You can "shade" the portion of the image outside of the selection. It is useful when you use the selection for cropping.

A special navigator control can be associated with the image viewer. Navigator controls specify behavior of the mouse events at the viewer - pan, zoom in/out, zoom in the selected rectangle. Custom behavior can be specified.

The control is compatible with the most modern browsers such as Internet Explorer 5 and above, Mozilla, Netscape.

Multi-layer Image Viewport

One more AJAX-based viewport specially designed to display composite images (e.g. several photos inside a postcard template, or vector image which consists of different objects like rectangles, ellipses, lines, etc) implements the following features:

  • Multiple layers.
  • Each layer can contain multiple vector objects (v-objects).
  • V-objects of the following types are supported:
    • Bitmap image
    • Rectangle
    • Ellipse
    • Line
    • Polyline
    • Text label
  • Appearance for v-objects can be modified in run-time (for example, outline color, fill color, font settings, etc).
  • V-objects can be transformed by a user (using a mouse - by dragging the object or one of its control points). The following actions are supported:
    • Move
    • Resize (including arbitrary and proportional)
    • Rotate
  • Each of aforementioned actions can be disabled if necessary.
  • Undo and redo operations support.
  • Z-order of v-objects and/or layers can be easily changed.
  • The content of the multi-layer viewport can be rendered into a bitmap with different resolution and color space.
  • Each layer can be easily hidden (without removing its v-objects).
  • The content of the control can be serialized, say, into a file, and then restored from a file.

CanvasViewer screenshot

AJAX technique allows avoiding unnecessary postbacks by handling most of the user actions client-side:

  • Geometric figures are drawn on the client-side via JavaScript and HTML;
  • Raster images and rendered text are cached at the client and re-downloaded from server only when the user modifies them.

Remote Scripting - Edit Image without Roundtrips

Graphics Mill for .NET implements a remote scripting mechanism which enables you to run server code from JavaScript without roundtrips (also known as AJAX). It allows you to create highly interactive web image editors.

  • Possibility to apply transforms to images directly from JavaScript. It will automatically call proper server code and update the image without roundtrip;
  • Extendable architecture: you can add your own remote scripting methods to apply some specific modifications (e.g. draw a border or add some text);
  • Possibility to disable unnecessary methods on the server side to increase the security;
  • Possibility to access/change control properties through the client-side JavaScript.

Examples of Usage

Using web controls of the Graphics Mill for .NET you can build such applications as:

  • Online photo editor:

    Online photo editor screenshot.

  • Web TIFF viewer:

    Web TIFF viewer screenshot.

  • Online business card editor:

    Business card editor screenshot.

  • Red-eye effect removal tool:

    Red-eye effect removal tool screenshot.

  • Gift Editor:

    Gift editor screenshot.

  • ...and any other imaging web application.

Source Code Available!

The source code for the Web controls is available upon purchase. The code is written in C#.

Note, the source code for the core class library is sold separately.