1
Installation

ImageGlue .NET is made up of two components: the ImageGlue Core Engine and ImageGlue itself.

The Core Engine is a native Windows DLL typically installed in system32. There are actually two Core Engines - a 32 bit one for x86 systems and a 64 bit one for x64 systems.

ImageGlue.DLL is a .NET tier and is placed in the GAC so that you can reference ImageGlue .NET from any of your projects. Should you require it you can always copy the DLLs to the bin directory of your application.

Unless you have side-by-side versioning (available in Windows XP) you will not be able to have multiple versions of ImageGlue installed in the GAC. In this case you should install the relevant assemblies in the bin directories of your application.

There are two optional COM+ applications that - ABCImageMagick.dll and ABCQuickTime.dll. These two COM+ components extend ImageGlue by using the ImageMagick and QuickTime libraries. This results in a greater number of image and movie file formats being supported.

2
ImageGlue 8 is like System.Drawing...

ImageGlue 8 is a new version completely independent of the old. Simply use the new namespace to switch to ImageGlue 8.

The API in WebSupergoo.ImageGlue8 is fundamentally different from the ImageGlue 7 API. It is based around the concepts in System.Drawing.

Should you wish to avoid changing your code, then continue using WebSupergoo.ImageGlue7. This namespace is preserved for backwards compatibility and it allows existing applications to use ImageGlue 7 without changes.

3
... But Different

The ImageGlue8 namespace is based around the concepts in System.Drawing. However, while very similar, it is not exactly the same.

Some areas have been fleshed out and some have been rationalized. The aim is to provide something akin to a System.Drawing 2.0.

Take the following code snippet. If you have been using System.Drawing in the past you will know why it is wrong.

[C#]

bitmap.Save(Server.MapPath("BezierBoundaries2.jpg"));


It is not obvious that this line of code will save a bitmap in PNG format. It is not enough to just provide a .JPG file extension - you need to use the Save overload which takes a second ImageFormat parameter.

So this is one thing we have changed. If you do not provide a format then ImageGlue will work out which one you want from the file extension. It makes things simple and obvious.

Indeed most of the changes we have made are for similar reasons. If, when you port your System.Drawing code, you find an API missing or changed it is likely that we are forcing you to think if perhaps the previous API was being used incorrectly.

4
To be Precise...

So what notable changes have been made?

  • Bitmap.Save infers the file type from the file name extension in cases where the format is not explicitly provided.
  • You can change the Bitmap PixelFormat, Width, Height, Resolution and other properties at any point. In System.Drawing these are fixed at the point of creation.
  • Bitmaps can be read and saved to a very wide variety of file formats in a variety of color spaces and bit depths.
  • Where System.Drawing uses single precision floating point numbers, ImageGlue uses double precision.
  • You can cast between similar structures - Point and PointF, Rectangle and RectangleF, Size and SizeF. Casts are implicit where no precision is lost and explicit in cases where rounding is required.
  • The Bitmap and Color classes work in a variety of color spaces rather than just RGB. So if you want to work in grayscale or CMYK this is simple to do.
  • There are a variety of effects available. These are designed to be easy to extend to allow access to sophisticated features with minimal amounts of code.
  • The ImageFormat has been fleshed out so you can convert between it, file extensions and MIME types.
  • The FrameDimension class has been converted to an enum.
  • We allow control over the default background color. We default it to white but if you need compatibility with System.Drawing then just set the Image.Backdrop to black.
  • The Graphics DrawImage functions in System.Drawing have a number of overloads which produce unpredictable results because they draw at a physical size rather than a size based on pixels. There are already overloads for these in DrawImageUnscaled so we do not implement the DrawImage ones. If you come across a compile time error here consider if your code is really intending to draw at a physical size. If it is then simply change the call to DrawImageUnscaled.
  • The default PixelFormat is, for efficiency, PixelFormat.ImageGlueRgb8 rather than PixelFormat.Format32bppArgb. However you can always change the default if you want something different.
  • You can draw rounded rectangles as well as normal rectangles.
  • The default MaxSize setting has been increased from 10,000 to 100,000 which effectively means that, by default, it is disabled. If this is something which is important to you then you may wish to set the value yourself.