<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/image-processing-in-net-without-native-dependencies-pwmatfwpq" -->

---
title: Image processing in .NET without native dependencies
description: Meziantou.Framework.Imaging is an MIT-licensed .NET package that reads and writes more than 20 image formats, including AVIF, HEIC and JPEG XL, with every...
canonical: https://daily.dev/posts/image-processing-in-net-without-native-dependencies-pwmatfwpq
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Image processing in .NET without native dependencies | daily.dev
og:description: Meziantou.Framework.Imaging is an MIT-licensed .NET package that reads and writes more than 20 image formats, including AVIF, HEIC and JPEG XL, with every...
og:url: https://daily.dev/posts/image-processing-in-net-without-native-dependencies-pwmatfwpq
og:image: https://api.daily.dev/og/posts/pwMatfwPq.png
og:image:alt: Image processing in .NET without native dependencies
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Image processing in .NET without native dependencies

**[Meziantou](https://daily.dev/sources/meziantou)** · 18 min read · 3 upvotes · 0 comments

## Summary

Meziantou.Framework.Imaging is an MIT-licensed .NET package that reads and writes more than 20 image formats, including AVIF, HEIC and JPEG XL, with every codec written in C# and no native dependency. It also offers more than 60 processing operations, drawing, text in any script and color management. The same package runs on Windows, Linux and macOS, on x64 and ARM64, and in trimmed and Native AOT apps. Limits on memory, size and frame count guard against hostile files. Benchmarks against ImageSharp 4.1.4 and SkiaSharp 4.158.0 are included in the post.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.meziantou.net/exploring-meziantou-framework-image-processing-in-dotnet-without-native-dependencies.htm>

## Questions this post answers

### Is there a .NET image library that reads AVIF and HEIC without native dependencies?

Meziantou.Framework.Imaging, an MIT-licensed NuGet package, implements every codec in C#, including the AV1 and HEVC codecs behind AVIF and HEIC. It reads and writes more than 20 formats, runs on Windows, Linux and macOS, on x64 and ARM64, and works in trimmed and Native AOT apps. ImageSharp does not read AVIF or HEIC files.

_Developers tracking .NET library choices follow releases like this on daily.dev._

### What happens in Meziantou.Framework.Imaging when I save an image to a format that can't hold all its data?

The library throws an UnsupportedImageFeatureException that says what to set, instead of silently writing a different image. This applies to saving transparent pixels as JPEG, a 16-bit image to an 8-bit format, or an animation to a single-picture format. Saving sRGB samples to OpenEXR or Radiance HDR, which store linear light, also throws.

_If you're handling user-uploaded images in .NET, daily.dev keeps you current on pitfalls like this._

### How do I protect a .NET app from huge or malicious uploaded images when decoding them?

Set an ImageConfiguration with ImageResourceLimits, for example MaxLiveAllocationBytes, and pass it in ImageDecodeOptions to Image.Load. Meziantou.Framework.Imaging checks the limits before allocating pixels and throws an ImageResourceLimitException. Corrupted files throw InvalidImageContentException, and unknown formats throw UnknownImageFormatException.

_Developers hardening upload pipelines in .NET find similar defenses discussed on daily.dev._

## Similar posts on daily.dev

- [.NET 11 Preview 4 is now available\!](https://daily.dev/posts/net-11-preview-4-is-now-available--rzwoyuciz) · .NET Blog · 39 upvotes · 2 comments
- [Content Creators Will Love This FOSS Android App](https://daily.dev/posts/content-creators-will-love-this-foss-android-app-ggulfwppd) · It's Foss · 1 upvotes · 0 comments
- [GitHub - cristibaluta/Imagin-Raw: A lightweight but powerful alternative to Adobe Bridge for Mac](https://daily.dev/posts/github---cristibaluta-imagin-raw-a-lightweight-but-powerful-alternative-to-adobe-bridge-for-mac-cwujrhw3j) · Hacker News · 0 upvotes · 0 comments
- [libavif 1.4 Released For Advancing AVIF Image Support](https://daily.dev/posts/libavif-1-4-released-for-advancing-avif-image-support-qrjtgocn4) · Phoronix · 1 upvotes · 0 comments

---

Tags: [#.net](https://daily.dev/tags/.net), [#c#](https://daily.dev/tags/c#), [#image-processing](https://daily.dev/tags/image-processing)

[View this post on daily.dev](https://daily.dev/posts/image-processing-in-net-without-native-dependencies-pwmatfwpq)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Image processing in .NET without native dependencies","url":"https://daily.dev/posts/image-processing-in-net-without-native-dependencies-pwmatfwpq","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/image-processing-in-net-without-native-dependencies-pwmatfwpq"},"datePublished":"2026-11-30T15:02:22.170Z","dateModified":"2026-11-30T15:02:45.924Z","description":"Meziantou.Framework.Imaging is an MIT-licensed .NET package that reads and writes more than 20 image formats, including AVIF, HEIC and JPEG XL, with every...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/83bf30053eeaa3976078b1a8c7215978?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/83bf30053eeaa3976078b1a8c7215978?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Meziantou","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Meziantou","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/1bdfdd5349654b08ab6fa3f1ac38192c","url":"https://daily.dev/sources/meziantou"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/image-processing-in-net-without-native-dependencies-pwmatfwpq","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":".net,c#,image-processing","timeRequired":"PT18M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Meziantou","item":"https://daily.dev/sources/meziantou"},{"@type":"ListItem","position":3,"name":"Image processing in .NET without native dependencies"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/image-processing-in-net-without-native-dependencies-pwmatfwpq#faq","mainEntity":[{"@type":"Question","name":"Is there a .NET image library that reads AVIF and HEIC without native dependencies?","acceptedAnswer":{"@type":"Answer","text":"Meziantou.Framework.Imaging, an MIT-licensed NuGet package, implements every codec in C#, including the AV1 and HEVC codecs behind AVIF and HEIC. It reads and writes more than 20 formats, runs on Windows, Linux and macOS, on x64 and ARM64, and works in trimmed and Native AOT apps. ImageSharp does not read AVIF or HEIC files. Developers tracking .NET library choices follow releases like this on daily.dev."}},{"@type":"Question","name":"What happens in Meziantou.Framework.Imaging when I save an image to a format that can't hold all its data?","acceptedAnswer":{"@type":"Answer","text":"The library throws an UnsupportedImageFeatureException that says what to set, instead of silently writing a different image. This applies to saving transparent pixels as JPEG, a 16-bit image to an 8-bit format, or an animation to a single-picture format. Saving sRGB samples to OpenEXR or Radiance HDR, which store linear light, also throws. If you're handling user-uploaded images in .NET, daily.dev keeps you current on pitfalls like this."}},{"@type":"Question","name":"How do I protect a .NET app from huge or malicious uploaded images when decoding them?","acceptedAnswer":{"@type":"Answer","text":"Set an ImageConfiguration with ImageResourceLimits, for example MaxLiveAllocationBytes, and pass it in ImageDecodeOptions to Image.Load. Meziantou.Framework.Imaging checks the limits before allocating pixels and throws an ImageResourceLimitException. Corrupted files throw InvalidImageContentException, and unknown formats throw UnknownImageFormatException. Developers hardening upload pipelines in .NET find similar defenses discussed on daily.dev."}}]}
```

