1. Home
  2.   Aforge
  3.   FileFormat.AForge for .NET
FileFormat.AForge for .NET

FileFormat.AForge for .NET

 
 

Simplify processing images Using .NET API

Effortlessly edit images with FileFormat.AForge, a lightweight open-source .NET API

FileFormat.AForge for .NET This is a fork of the AForge.Net project, which includes the Imaging library. This version has been translated into the NetStandard 2.0 framework, and uses Aspose.Drawing) as a graphics engine, which allows you to create cross-platform applications using lastest .Net platforms.

FileFormat.AForge is available under licenses:

FileFormat.AForge is distributed under LGPL license.

Aspose.Drawing .NET is distributed under Aspose EULA license.

Key Features and Benefits

  • Cross-Platform:Thanks to integration with Aspose.Drawing the library can work with images on the latest versions of .Net on Windows, Linux, MacOS platforms

How to Get Started with FileFormat.AForge for .NET

Getting started with FileFormat.AForge is quick and easy. Simply follow these steps:

  • Install FileFormat.AForge: Install the FileFormat.AForge package via NuGet Package Manager or .NET CLI.
  • Integrate with Your Project: Reference the FileFormat.AForge library in your C# project.
  • Start Processing: Utilize the simple API provided by FileFormat.AForge processing images.

The recommended way to install FileFormat.AForge for .NET is using NuGet. Please use the following command for a smooth installation.

Install FileFormat.AForge for .NET via NuGet

NuGet> Install-Package FileFormat.AForge 
You can also download it directly from GitHub.

Apply grayscale filter in C#

This code converts the image to grayscale format.

Copy and paste the code snippet below into your main file and execute the program.

Convert image to grayscale format

 
//Set License for Aspose.Drawing
System.Drawing.AsposeDrawing.License license = new System.Drawing.AsposeDrawing.License();
license.SetLicense("Aspose.Drawing.License.lic");

//Create grayscale filter
var grayscaleFilter = new FileFormat.AForge.Imaging.Filters.Grayscale(0.2126, 0.7152, 0.0722);

//open image
using (var bmp = (Bitmap)Image.FromFile(@"sample.bmp"))

//convert image to grayscale
using (var grayscaleImage = grayscaleFilter.Apply(bmp))
{
    //save grayscale image
    grayscaleImage.Save(@"grayscale.png", ImageFormat.Png);
}

You can see other examples directly on the AForge website.