Graphics Mill vs System.Drawing
You may wonder why you should use Graphics Mill instead of standard .NET imaging functionality (GDI+ library wrapped in the System.Drawing namespace)? In fact, Graphics Mill has a number of undisputed benefits when compared to GDI+. Moreover, Graphics Mill can be used not only as a substitute for GDI+, but also as an extension. The additional features of Graphics Mill are discussed below.
Windows and ASP.NET Service Support
Microsoft documentation states that classes from the System.Drawing namespace (providing access to GDI+ basic graphics functionality) are not supported for use within a Windows or ASP.NET service. Graphics Mill is designed and tested specifically for use in such an environment. Moreover, Graphics Mill provides straightforward file-to-file image processing facilities, which are more suitable for ASP.NET applications.
Graphics Mill is optimized for processing thousands of images simultaneously and shows up to 10 times faster speed in comparison with GDI+.
Improved Memory Consumption
GDI+ implements a conventional image processing approach - it loads whole images into memory before processing them. So if you have an application loading large-scale images or doing heavy image processing, it can end up with the dreaded "out of memory" issue (when no free RAM is available for completing an operation). Distinct from GDI+, Graphics Mill processes images strip by strip, and dumps temporary bitmap data to the hard drive. This guarantees stability and eliminates any possibility of memory problems.
More File Formats
In addition to formats supported by GDI+, Graphics Mill can:
- Load images layer by layer from the Adobe Photoshop format (PSD).
- Rasterize the PDF format.
- Save raster data, text, and vector graphics to the PDF, SVG, and EPS formats.
- Load raster data, text, and vector graphics from the PDF and SVG formats.
- Work with the WebP format.
More Pixel Formats (Including CMYK)
Graphics Mill supports CMYK images, which is especially important when you are preparing an image for printing. Using Graphics Mill, you can convert RGB images to CMYK, load (as well as save) CMYK images directly from files, and apply effects directly to CMYK images.
Graphics Mill supports grayscale images.
Graphics Mill supports Lab images. The Lab color space includes both the RGB and CMYK gamuts, so it is very useful as an intermediate format for conversion between RGB and CMYK color spaces.
Graphics Mill can work with extended pixel formats (i.e. 16 bits per channel), such as 48-bit RGB, 64-bit CMYK, 16-bit grayscale, etc. Although GDI+ can read extended images, it automatically converts them to non-extended images. On the contrary, Graphics Mill preserves extended pixel formats after loading and allows the applying of operations, saving, etc.
Advanced Conversion Between Pixel Formats
Graphics Mill allows advanced conversion between different pixel formats. When converting pixel formats using GDI+, you cannot alter this process in any way. Graphics Mill allows you to specify conversion settings (leaving the possibility to convert pixel formats without much effort).
- When converting between RGB, CMYK, or grayscale (including converting within the same color space, e.g. RGB -> RGB), you can apply color management. You can specify the ICC profile of the device or color space you are converting pixels to, and Graphics Mill will apply precise conversions with minimum color distortions. This is especially important for the printing industry.
- When applying color reduction (e.g. converting a 24-bit RGB image to an 8-bit indexed bitmap), you can specify the palette (or request to generate the optimal palette for the image), required number of colors, and dithering settings. This way, you get powerful tools for creating web-optimized images.
Ready-to-Use Effects and Transforms for Images
- You don't need to implement the effect yourself every time you want to, say, sharpen the image, or apply distortion to an image.
- While GDI+ allows the applying of some effects with a color matrix or a Graphics object, Graphics Mill provides a much more convenient and intuitive means that require less code writing to get the same results.
- For effects such as resize, rotate, etc., Graphics Mill provides more interpolation modes which produce a higher quality result.
Possibility to Apply Lossless Manipulation to JPEG Files
Graphics Mill provides more advanced support of JPEG files compared to GDI+. You can not only load it as a bitmap, but also apply certain operations to the compressed JPEG data. The main advantage of this approach is that the JPEG image quality is not reduced (as opposed to the standard approach when you first decode the image and then encode it). As a bonus, it sometimes increases the performance of your application.
- Rotate 90, 180, or 270 degrees and/or flip the compressed JPEG image data.
- Crop an image without JPEG decompression. The quality of the cropped JPEG will be the same as the quality of the original bitmap.
- Copy a bitmap to the compressed JPEG image data. It will encode only the modified part of the image and leave the rest intact. This way, if you modify only a small section of the image (e.g. draw a watermark or remove the red-eye effect), the overall quality of the image will not be changed.
- Modify EXIF, IPTC, and XMP fields, as well as Adobe® image resource blocks, without decoding and encoding the JPEG file.