- About Graphics Mill
- What's New?
- Breaking Changes in Graphics Mill 12
- Breaking Changes in Graphics Mill 11
- Features
- Supported File Formats
- System Requirements
- Getting Started
- Your First Application with Graphics Mill
- Understanding Image Processing Approaches in Graphics Mill
- Evaluating Graphics Mill
- Registering Production License Keys
- Upgrading from Graphics Mill 5
- Installation and Redistribution Notices
- Graphics Mill Configuration
- Using Graphics Mill with Microsoft Azure
- Using Graphics Mill in .NET projects
- Working with Image Formats
- Transforming Images (Resize, Rotate, Crop)
- Working with Metadata
- Color Management and Color Reduction
- Drawing Text and Graphics
- Color Keying (Green Screen Removal)
- Channels and Pixel Data
- Color and Tone Correction
- Working with Photoshop (PSD) Files
- Image Filters
- Processing Large Images
- Basics of Image Processing
- Troubleshooting
- Class Library Reference
- Licensing
- End User License Agreement
- Copyright Notices
Registering Production License Keys
This article describes license types and how you can register a production license key. If you want to evaluate Graphics Mill before you purchase a license, you can get a trial license key as described in the Evaluating Graphics Mill topic.
There are several ways to register a license key for Graphics Mill:
- On a development computer, you can set a license key in the source code of your application.
- On a development web server, you can set a license key in the application's
web.configfile. - You can register a license key using the LIC file on a production or development web server.
- You can apply a license by setting the GRAPHICSMILL_LICENSE_KEY environment variable.
- You can also apply a license key by updating the Windows Registry manually.
License Types
Graphics Mill works with the following license types:
- Evaluation is a full-featured license that works for two weeks.
- Developer is needed for development and should be used on your development machine.
-
Desktop Application is bound to a strong name (public key token) and can be used for distributing royalty-free Windows-based desktop applications. To generate such a license, generate a token on your development machine using
sn.exeand send the public token to Aurigma; no activation code is required. If this license type is unavailable in your account, you can contact our support team. - Floating license is designed for containerized environments. No activation code is required - just provide the number of seats you need.
- Server Application allows you to install Graphics Mill on a server. This license requires you to specify your activation code.
- Enterprise Application has a custom licensing policy and is not generally available.
Editions
For server licenses, Graphics Mill is available in two editions: Standard and Professional. The Professional edition includes the Standard edition's features, but additionally supports reading PSD (Photoshop) files.
Activation codes
When Graphics Mill fails to locate a valid license, it displays an error message containing an activation code. Please provide this code to our support team, who will issue the corresponding license for your environment. Then, find the license in your Graphics Mill account.
License Key Formats
Starting from Graphics Mill 10, license keys have the following format:
gm.std.dev.max:5.maint:2018-01-01_QJ8Zbs68BtSXG6a2/AFlXY65LWC//WUfX5yv8NJmaHiIZbgwKWhpn3+GdWcFZ1h3fjRmIM3ZKwH2sqQ2pCYilpACFuFFOiuUpJJIaw6fEzbmEEuZnVlkfpRd450HChjddA==
You may notice that such a key contains license parameters in its prefix.
License keys of earlier versions look as follows:
80FF0-020B2-99F10-00074-942DF-5E924B
Registering the License Key
In the Source Code
In your application, you can specify a license key by using the static method License.Set(String).
var key = "<YOUR_LICENSE_KEY>";
Aurigma.GraphicsMill.Licensing.License.Set(key);
In the web.config File
This way is not available in the .NET 9 build of Graphics Mill, because it does not read the appSettings section. See Using Graphics Mill in .NET projects for details.
On a development web server, you can apply a license key in your application's web.config file. To perform this, insert your license key in the appSettings section. For example, for Graphics Mill 10 this key may look as follows:
<appSettings>
<add key="GraphicsMillLicenseKey" value="<YOUR_LICENSE_KEY>" />
</appSettings>
Don't use this approach with Enterprise licenses (with custom licensing) if you deliver a third-party solution as it may disclose your license key.
Using a LIC File
If you deploy a web application on a server where you have no permission to patch the registry, you can register a production key using a LIC file.
If you develop a desktop application, do not include a production license key in the end product using a LIC file!
- Create a new text file named
Aurigma.GraphicsMill.lic. - Insert your license key into this file. Make sure that this file has no extra characters, such as white spaces, etc.
- Copy this file into the
\binfolder of your web application.
Using an Environment Variable
You can apply a license by setting the GRAPHICSMILL_LICENSE_KEY environment variable. This is particularly useful for containerized deployments where using a registry or file-based license is inconvenient.
- Set the
GRAPHICSMILL_LICENSE_KEYenvironment variable to your license key. - If you're using a container (e.g., Docker), pass the variable using the
-eflag or through your orchestration tool (Kubernetes secrets, etc.). - For IIS or Windows services, set the variable at the system level or within the application pool and restart the service.
Using the Licenses.licx File
This way is not available in .NET projects. It works only in .NET Framework projects.
This approach is intended for desktop applications and requires a Desktop Application license. You should apply all the steps described in this section on the development machine only. After you execute these instructions correctly, a production license key will be imported into the resources of your application. Therefore you do not need to register Graphics Mill on the customers' workstations.
- Register Graphics Mill on the development machine using one of the methods described in this article (for example, in the source code or the web.config file).
- If Visual Studio is already open, close it and then reopen it.
- Add a new text file named
Licenses.licx(you cannot give this file any other name) into the project, or open an existing one.NoteNormally, Visual Studio hides this file in the Solution Explorer. That's why it is possible that this file already exists in your project (under certain circumstances it is auto-generated). In this case, click Show All Files on the Solution Explorer tree pane to see this file.
If you use Graphics Mill as a custom control application (rather than in an end-user desktop application), you should add the
Licenses.licxfile into the desktop application that uses your control. -
Add the following string into this file:
Aurigma.GraphicsMill.Bitmap,Aurigma.GraphicsMillIn other words, you should add the name of the licensed class and DLL name without the file extension, separated by a comma.
- Rebuild the project (not the solution).
If the license key works on the developer's machine and does not work on the customers' workstations, this most likely means that there are some problems with the Licenses.licx file. In this case, check whether you have correctly performed Step 2 above.
Resolving a Problem with the License Type Exception
When you compile your application and obtain the LicenseException: This license type cannot be embedded into the assembly, you should verify the license type of the registered key.
To embed a license key into an assembly, you need a Desktop Application license. Such a key must be in the registry at the compilation time.
Building a license resource for desktop applications
If you have a complicated build process or don't want to have a dependency on a registry, it is possible to build a resource for your desktop application manually. In this case, it's not necessary to have a license for the currently building application in the registry.
- Place the following files in your working folder:
-
Aurigma.GraphicsMill.dll- the actual version of Graphics Mill you are going to reference. -
Aurigma.GraphicsMill.lic- a text file with the license key. -
complist.txt- a text file withAurigma.GraphicsMill.Bitmap,Aurigma.GraphicsMillstring, like in the licenses.licx.
-
- Run the License Compiler.
lc.exeis a part of Windows SDK, so the probable path where you can find it looks like this:
"C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7.1 Tools\x64"Run this on the command line:
lc.exe /target:YourApplicationName.exe /complist:complist.txt /i:Aurigma.GraphicsMill.DLLThen, find the generated
yourapplicationname.exe.licensesfile.NoteThe bitness of
lc.exeandAurigma.GraphicsMill.dllfiles must be the same. - Embed the resource in your project.
Now you need to put the file obtained in the previous step in your project directory and add the following lines to your.csprojfile:XML<Target Name="BeforeBuild"> <ItemGroup> <EmbeddedResource Include="yourapplicationname.exe.licenses"> <LogicalName>YourApplicationName.exe.licenses</LogicalName> </EmbeddedResource> </ItemGroup> </Target> - Build the project and check that the license is applied correctly.
You need to repeat these steps each time you update your license or Graphics Mill version.
Updating the Windows Registry Manually
You can apply a license key by updating the Windows Registry manually. To perform this, download your license key from My Licenses & Downloads and create the .reg file or update the following keys of the Windows Registry, depending on your Graphics Mill version:
- Starting from Graphics Mill 10:
[HKEY_LOCAL_MACHINE\SOFTWARE\Aurigma\Graphics Mill for .NET\10.0] "License Key"="YOUR_KEY" [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Aurigma\Graphics Mill for .NET\10.0] "License Key"="YOUR_KEY" - Earlier versions:
[HKEY_LOCAL_MACHINE\SOFTWARE\Aurigma\Graphics Mill for .NET\6.0] "License Key"="YOUR_KEY" [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Aurigma\Graphics Mill for .NET\6.0] "License Key"="YOUR_KEY"
Also, you can download the .reg file from the following link: Register License Key Offline.
License Resolution Order
Graphics Mill checks for a license in the following order. The first valid license found is used.
License Key Validation
If you have a version earlier than Graphics Mill 10, you can check whether the registered license key is a trial or production key as well as obtain the expiration date. The following code sample demonstrates how to perform that check.
var license = Aurigma.GraphicsMill.Configuration.License;
if (license.IsTrial)
{
Console.WriteLine("Evaluation period expires on " + license.ExpirationDate.ToString());
}
else
{
Console.WriteLine("Maintenance period expires on " + license.MaintenanceExpirationDate.ToString());
}
Graphics Mill 10 allows you to check the following license parameters.
var lic = Aurigma.GraphicsMill.Configuration.License;
Console.Write(System.String.Format("{0};{1};{2};{3};{4};{5};",
lic.Source, // a license key
lic.IsTrial, // whether this is an evaluation license
lic.ExpirationDate, // the license expiration date
lic.MaintenanceExpirationDate, // the maintenance period
lic.IsDeveloper, // whether this is a Developer license
lic.IsDesktopOnly // whether this license is for desktop use only
));