BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News ImageSharp 2.0.0: the Feature-Packed Release

ImageSharp 2.0.0: the Feature-Packed Release

This item in japanese

Bookmarks

On 7 February, ImageSharp, one of the most popular .NET image-processing libraries, released version 2 of their library. The release includes major features such as supporting WebP, TIFF and PBM as well adding XMP support with various performance improvements and enhancements for JPEG and PNG formats. This release drops support for .NET Standard 1.3. The update replaces version 1.0.4.

The new pixel processing and low-level management APIs will significantly improve performance, according to Six Labors. ImageSharp is now the fastest cross-platform library in the benchmark according to Six Labors. The benchmark utilised .NET 6 with a 16GB machine covered eight different libraries performing the same test "Load image, Resize image and Save image".

Another important feature is the update to the quantization algorithms (the process of mapping input values from a large set, often a continuous set to output values in a countable smaller set, often with a finite number of elements) enhancement while using Image Mutate/Clone.

In addition to dropping support for NetStandard 1.3, which Microsoft no longer supports, the new version targets the unmanaged pooling MemoryAllocator which targets garbage collector issues which should provide better memory management as well better performance.

There is a lot of new format support within the release. The main ones are WebP (which the community has been asking for a while), TIFF, PBM and XMP metadata support (originally created by Adobe as a standard data model, a serialization format and core properties for the definition and processing of extensible metadata for embedding XMP information into popular digital documents).

ImageFormat format;

using (var image = Image.Load(inputStream, out format))
{
    image.Mutate(c => c.Resize(30, 30));
    image.SaveAsWebp(outputStream, format); // ImageSharp provides common extension methods to save an image into a stream using a specific format.
}

Additionally, this release includes various bug fixes and enhancements. For example, WebP uses byte arrays instead of dictionaries for lookups. JPEG encoding is optimized via removing a second transpose call from FDCT. The release also fixes the issue with the use of RGB24 for async JPEG decoding and much more. It is the biggest release since version 1 a few years ago.

This release is jam packed with new features and enhancements, but one major item is still missing which is JXL (JPEG XL) support.

To get the full details about each of the new features and enhancements that make up ImageSharp 2.0.0, do not miss the official release notes.

 

About the Author

Rate this Article

Adoption
Style

BT