Converting High-Efficiency Image Container (HEIC) Files (to JPEGs or Others) in .NET

If you’re an iPhone user, you may have come across HEIC files. Apple started using them as the default format for pictures taken with the iPhone since around 2017. This format provides vast space improvements over the beloved JPEG format often cutting the size down in half or more and retaining the same quality or even better quality. It also supports image sequences (think GIF animations).

But the reality on the ground is that most of the world still lives on JPEGs. So, it was understandable when I recently got a request for programmatically converting HEIC files over to JPEGs.

Enter Magick.NET

It’s a .NET wrapper around ImageMagick, the de facto image processing library for the web that has been around for ages. You can search for it on NuGet, download and install the appropriate version you need. Read the docs to figure out which version you need. With the package installed, converting an HEIC file to JPG is simple as:

Now Magick.NET, does way more than just convert .HEIC files. If you need to do any sort of image processing in .NET, check it out and it’s very likely that the feature that you’re looking for is there. And yes, it’s open source.

Leave a Comment

Your email address will not be published. Required fields are marked *