TrophyCustomer's Canvas is honored with a 2020 InterTech Technology Award! Learn more 

Getting started with Dynamic Image

You can contact our support team to get the Dynamic Image application.

The Distribution Package

This distribution package represents the DynamicImage_<version-number>.zip file and contains the Dynamic Image application and a tool to manage licenses in the following folders:

  • DI-<version-number>
  • LicenseManager

How to Deploy the Dynamic Image

  1. Unzip DynamicImage_<version-number>.zip to a new IIS folder.
  2. In IIS Manager, create an application pool with the NetworkService identity. If you prefer using other values, be ready to configure permissions for the PsdWebService data folders.
  3. Create an Application (if you want to put it into a folder for your main site) or add a website to the Sites list associated with this folder (if you want to deploy a service on a separate domain). Set the AppPool you have created for this application/site.
  4. In AppSettings.config, configure your asset folders, the cache, and other parameters, or leave the default values.

Note: A user account, under which the PsdWebService runs in IIS, must have Read and Write permissions to the App_Data and Logs folders.

How to Register License Keys

To start working with Dynamic Image, you need a license key - either an evaluation or production key. To obtain a license, you should use the License Manager. You can find this tool and its manual in the LicenseManager folder.

To register a license key for the 30-day evaluation period:

  1. Run LicenseManager.exe
  2. Click Activate 30-day evaluation, fill in your account details, and click Proceed.

Note: If you prefer using the Aurigma.GraphicsMill.lic file, copy this file to the \bin\ folder.

For details about license types and license keys, you can refer to the documentation.

Running the Dynamic Image

Let us assume that your Dynamic Image shares a domain name with the main website and is located in the /DI/ virtual folder, and your have a badge.psd template which is in the templates folder.

In this sample, we define the text, image, and background color for the source template and render a proof image.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>The Dynamic Image Sample</title>
    <script type="text/javascript" src="https://code.jquery.com/jquery-2.2.0.js">
    </script>

<script language="javascript">
document.addEventListener("DOMContentLoaded", function() {

    var cfg = {
        "Photo": {
            "type": "image",
            "image": "https://placekitten.com/500/500",
            "resizeMode": "fill"
        },
        "Name": {
            "type": "text",
            "text": "John Wood"
        },
        "Background": {
            "type": "shape",
            "color": "#eeeb00"
        }
    };

    var data = {
        template: "badge.psd",
        data: cfg,
        format: "png"
    };

    $.ajax({
        url: "http://localhost/DI/api/preview",
        type: "POST",
        contentType: 'application/json; charset=utf-8',
        dataType: 'json',
        data: JSON.stringify(data),
        success: function(d) {
            console.log(d);
        },
        error: function(d) {
            console.error(d.responseText);
        }
    });
});
</script>
</head>
<body>
    <h3>The Dynamic Image Sample</h3>
</body>
</html>

When the page is loaded, it will display the link to a preview image in the browser console.