Graphics Mill 6 – What is new and why the perfomance increased so significantly

Graphics Mill 6 was just released by Aurigma. Memory efficiency and overall performance are remarkably improved. Read on to find out how such exceptional results were attained through the hard work and dedication of Aurigma’s outstanding engineers.

Aurigma’s latest offering is the just released Graphics Mill 6. As you will see, this is more of a re-launch of the product than a run-of-the-mill update. There is a new website, but that is not all that is better about this version. A lot of the things that Aurigma’s engineers improved and streamlined in Graphics Mill 6 are internal. But don’t be fooled just because they are not readily visible before you use the system, the improvements in performance and system efficiency are in a word, vast.

"Out of memory" with large images

In the old version there were customers who faced an "out of memory" problem when trying to load very large images. This was not a bug, rather it was a consequence of the old architecture of Graphics Mill. When images of a very large size were processed, for example a 10,000x10,000 bitmap, the system would be forced to load the entire image into memory - all 400MB of it! Although the old architecture was optimized, when an image of a certain size was reached, the problem was inevitable.

The solution we needed called for a radical "under the hood" redesign of Graphics Mill 6. In the new version, bitmaps are loaded chunk-by-chunk. Each chunk is individually processed, and they are all saved into an image file. This process had the risk of being very painful for a developer to manage. Therefore Aurigma’s engineers made the improvement not only memory friendly, but also seamless and invisible to the user.

The solution - pipeline API

Aurigma’s solution is elegant: instead of first loading a bitmap from (for example) a JPEG file, then calling different methods to process the image, and then calling the Save method, we’ve developed an improved system. Pipeline API is an approach that involves a serialized and standardized chain of algorithms that move the image file through its development "pipeline".

To make it clear, let's see how a resize operation looks:

protected override void Resize(string filename, 
		Stream result, WriterSettings settings, 
		int width, int height, ResizeInterpolationMode quality)
{
	using (var reader = ImageReader.Create(filename)) 
	using (var resize = new Resize(width, height, quality))
	using (var writer = ImageWriter.Create(result, settings))
	{
		Pipeline.Run(reader + resize + writer);
	}
}

The first pipeline element is the image reader, the next one is a resizer, and the last one is the file writer. When you process the image through the pipeline the following things happen: the reader receives the first piece of the image, passes it to the resizer, and the resizer sends it to the writer.

As a result, the entire image is never loaded. System requirements are only to allocate enough memory to hold one portion of the image (one scanline). The memory being utilized is then freed when the next portion of image is loaded. This is how Aurigma’s revolutionary Graphics Mill 6 allows you to process an image of virtually any size!

Of course, you can run the image through various pipelines containing multiple manipulations - not just resizing, but also (for example) color space conversions, image combiners, etc.

Not just memory-friendly, but fast!

Memory efficiency is not the only benefit of this new approach. There is a significant performance bonus as well. Our benchmarks illustrated that performance increased several times, and for certain image sizes and algorithms, tens of times. Graphics Mill 6 surpasses not only the old version but our competitors’ offerings as well. And there are still built-in .NET imaging features for ease of use.

Classic API still available

You may think that because of this new API, your old code isn’t compatible. Fear not, your old code will still work great with Graphics Mill 6 and with any smaller images you may be handling now. You can quickly and easily select between the classic API or the new pipeline API.

What else is there in Graphics Mill 6?

Although such drastic performance increases alone are reason enough to release a major update, Aurigma did not stop there. We have also added two very important features, which are often unavailable in other, lesser imaging SDKs:

  1. When you save a PDF, now you can save vector data as well—including text.
  2. Now you can handle an image clipping path, saved in Photoshop.

In future posts, we’ll give you more detail about these and other exciting improvements in Graphics Mill 6.