AI-generated, compiler-validated C# examples for the Aspose.Imaging for .NET API.
| Metric | Value |
|---|---|
| Total Examples | 2874 |
| Categories | 17 |
| Overall Pass Rate | 100.0% |
| Last Updated | 2026-06-05 |
agents.md
README.md
+-- conversion/
+-- convert-apng/
+-- convert-cdr/
+-- convert-cmx-images/
+-- convert-dicom-images/
+-- convert-eps-images/
+-- convert-open-document-graphics/
+-- convert-raster-image/
+-- convert-svg-to-raster-images/
+-- convert-webp-images/
+-- converting-wmf-and-emf/
+-- image-and-photo-filters/
+-- kernel-filters/
+-- manipulate-different-image-file-formats/
+-- manipulating-images/
+-- merge-images/
+-- working-with-drawing-images/
| Category | Examples | Pass Rate | Details |
|---|---|---|---|
| Conversion | 162 | 100.0% | agents.md |
| Convert APNG | 51 | 100.0% | agents.md |
| Convert CDR | 30 | 100.0% | agents.md |
| Convert CMX Images | 34 | 100.0% | agents.md |
| Convert DICOM Images | 30 | 100.0% | agents.md |
| Convert EPS Images | 60 | 100.0% | agents.md |
| Convert Open Document Graphics | 120 | 100.0% | agents.md |
| Convert Raster Image | 141 | 100.0% | agents.md |
| Convert SVG to Raster Images | 40 | 100.0% | agents.md |
| Convert webp Images | 30 | 100.0% | agents.md |
| Converting WMF and EMF | 29 | 100.0% | agents.md |
| Image and Photo Filters | 138 | 100.0% | agents.md |
| Kernel Filters | 464 | 100.0% | agents.md |
| Manipulate Different Image File Formats | 600 | 100.0% | agents.md |
| Manipulating Images | 413 | 100.0% | agents.md |
| Merge Images | 135 | 100.0% | agents.md |
| Working With Drawing Images | 397 | 100.0% | agents.md |
git clone https://github.com/aspose-imaging/agentic-net-examples.git
cd <category>
dotnet run <example-file.cs>- .NET SDK (net9.0)
- Aspose.Imaging for .NET (via NuGet)
The agent that generates these examples follows a three-attempt pipeline per task:
| Attempt | Strategy | Trigger |
|---|---|---|
| 1 | Raw MCP call with path-safety rules | Always |
| 2 | MCP call with LLM-selected category rules | Attempt 1 fails |
| 3 | LLM direct fix with compiler errors + rules | Attempt 2 fails |
After all tasks complete, a retry pass automatically re-runs any failed tasks through the full 1→2→3 pipeline once more. Only examples that pass both dotnet build and dotnet run are committed to the repository.
Every pull request is automatically validated by GitHub Actions (validate-pr.yml):
dotnet build— required, blocks merge on failuredotnet run— informational, runtime errors are expected when input files are absent
Examples are versioned by NuGet release. Each version gets its own branch and a GitHub release tag. When a new NuGet version is available, the agent creates a release tag on main, bumps the NuGet version, and starts generating examples on a new branch. Once complete, the branch is merged into main.
The agent exposes a public REST API for programmatic access:
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/v1/run/prompt |
Submit a single task |
POST |
/api/v1/run/category |
Submit a full category run |
GET |
/api/v1/status/<job_id> |
Poll job status |
GET |
/api/v1/results/<category> |
Get category results |
GET |
/api/v1/categories |
List available categories |
GET |
/api/v1/stats |
Overall stats from GitHub |
API documentation is available at
/api/v1/docs. The API is intended for internal team use.
All examples are compiler-validated against the target NuGet version before being committed. The benchmark is a 100% build pass rate across all generated examples.
| Version | Total Examples | Pass Rate | Framework |
|---|---|---|---|
| 26.6.0 | 2874 | 100.0% | net9.0 |
Pass rate is enforced by the agent pipeline — only examples that pass both dotnet build and dotnet run are committed.
Validation runs automatically on every pull request targeting main via GitHub Actions (validate-pr.yml).
To trigger validation:
- Push your branch to GitHub
- Open a pull request targeting
main - GitHub Actions will automatically build and run all changed
.csfiles - Build failures block the merge — runtime errors are informational only
Each pipeline run ships telemetry to a central metrics store including examples discovered, passed and failed per category, LLM token usage, MCP and LLM API call counts, and pipeline duration.
| Operation | Formats Supported | Examples Count | Key Classes |
|---|---|---|---|
| General Conversion | BMP, JPEG, PNG, TIFF, GIF, WebP, SVG, PSD, PDF, DICOM, CDR, CMX, EPS, ODG, APNG | 45 | Image, RasterImage, VectorImage, ImageOptionsBase |
| APNG Conversion | APNG → PNG, GIF | 5 | ApngOptions, PngOptions, Image |
| CDR Conversion | CDR → BMP, JPEG, PNG, TIFF, PDF | 4 | CdrImage, Image, BmpOptions, JpegOptions |
| CMX Images Conversion | CMX → BMP, JPEG, PNG, TIFF | 3 | CmxImage, Image, PngOptions |
| DICOM Images Conversion | DICOM → BMP, JPEG, PNG, TIFF, PDF | 6 | DicomImage, Image, TiffOptions |
| EPS Images Conversion | EPS → BMP, JPEG, PNG, TIFF, PDF | 5 | EpsImage, Image, PngOptions |
| Open Document Graphics (ODG) | ODG → BMP, JPEG, PNG, TIFF, PDF | 4 | OdgImage, Image, JpegOptions |
| Raster Image Conversion | BMP, JPEG, PNG, TIFF, GIF, WebP | 12 | RasterImage, Image, BmpOptions, WebpOptions |
| SVG to Raster Images | SVG → PNG, JPEG, BMP, TIFF, WebP | 8 | SvgImage, RasterImage, PngOptions, WebpOptions |
| WebP Images Conversion | WebP ↔ BMP, JPEG, PNG, TIFF | 5 | WebpImage, Image, BmpOptions, JpegOptions |
Explore the full range of Aspose.Imaging for .NET C# image processing examples. If you need to transform vector graphics, see the convert-svg-to-raster-images and convert-open-document-graphics samples; for raster workflows, the conversion and convert-webp-images categories demonstrate image conversion C# techniques. The image-and-photo-filters and kernel-filters sections showcase advanced capabilities of this C# imaging library, while merge-images and working-with-drawing-images illustrate how to combine and draw on images using Aspose.Imaging examples. All of these resources are part of the dotnet image processing suite to help you get up and running quickly.
Use the ImageConverter class or call Image.Save with a different ImageFormat. Load the source file with Image.Load, then invoke image.Save("output.png", new PngOptions()) to perform image conversion C#. The Aspose.Imaging examples in the repository demonstrate this workflow for common formats.
Instantiate a ResizeOptions object and set Width, Height, and ResizeMode, then call image.Resize(resizeOptions). For loss‑less scaling, use image.Save("resized.jpg", new JpegOptions { Quality = 90 }). This is a typical pattern in dotnet image processing with the C# imaging library.
Create a filter such as GaussianBlurFilter or SharpenFilter and pass it to image.ApplyFilter(filter). After applying, save the result with the appropriate options, e.g., image.Save("filtered.bmp"). The Aspose.Imaging for .NET documentation includes code snippets for these C# image processing tasks.
Use the Graphics class obtained via new Graphics(image) and call methods like DrawRectangle, DrawEllipse, or DrawLine with a Pen. Remember to dispose the Graphics object to commit changes, then save the image. This approach is highlighted in the Aspose.Imaging examples for drawing with the C# imaging library.
Load each image as a RasterImage, create a new canvas with the combined dimensions, and draw each source image onto it using Graphics.DrawImage. Finally, save the canvas as a single file, e.g., merged.png. The repository contains Aspose.Imaging for .NET sample code for image merging.
Open a DICOM file with DicomImage dicom = new DicomImage("file.dcm") and access pixel data via dicom.GetImage(). You can then convert, resize, or apply filters just like any other raster image. This demonstrates powerful C# image processing capabilities of the Aspose.Imaging library.
Load the vector file using SvgImage svg = (SvgImage)Image.Load("vector.svg") and rasterize it with svg.Save("output.png", new PngOptions()). You can also specify size through svg.Width and svg.Height before saving. The Aspose.Imaging examples show this straightforward SVG conversion workflow.
Create an ApngImage instance, add frames with apng.AddFrame(frameImage, frameDelay), and finally call apng.Save("animation.apng"). Each frame can be a RasterImage processed with the same C# imaging library tools. This is a common pattern in Aspose.Imaging for .NET for animated PNG generation.
You can run the library in evaluation mode; simply omit the License registration code. The unlicensed mode adds a watermark to output images and limits some features, but all core C# image processing functions remain accessible. Refer to the Aspose.Imaging examples for guidance on handling the evaluation behavior.
Aspose.Imaging for .NET supports raster formats (BMP, JPEG, PNG, TIFF, GIF, WebP), vector formats (SVG, EPS, WMF), medical formats (DICOM), and animated formats (APNG, animated GIF). The library also handles raw and proprietary formats through dedicated classes like RawImage and DicomImage. Check the official documentation for the full list of supported formats.