What's the best way to read EXIF info of a picture in Asp.Net Core. I am using ImageProcessorCore alpha from myget to rotate pictures but i haven't found a way to read exif data is there a in library way of doing this?
-
quite a few of them: https://www.nuget.org/packages?q=exif – Takahiro Jul 21 '16 at 13:35
-
2are you sure that these work with asp.net core ? i cant include net45 I am deploying on linux. I have tried most and only Image Processor has ported to .net core – Dživo Jelić Jul 21 '16 at 19:18
-
i'm not sure, but most of them are open-sourced, you can folk it from github and upgrade it by yourself. I can do it for you but not today, may be next week if you need help. – Takahiro Jul 22 '16 at 00:36
-
Found one on .NETStandard 1.5 https://www.nuget.org/packages/NExifTool/ – Takahiro Jul 22 '16 at 06:52
-
Yes it ok has nice api but it requires http://www.sno.phy.queensu.ca/~phil/exiftool/install.html tool to be installed i am trying to do it on my local server – Dživo Jelić Jul 22 '16 at 16:19
-
@salitio i am not sure that i can do it on my own i will try – Dživo Jelić Jul 22 '16 at 16:29
5 Answers
The lightweight ExifLib has now been ported to .net Standard/.net Core.
I have confirmed it also works on Linux.

- 10,146
- 3
- 40
- 45
I was able to find a library that reads exif info and it is available for .net core i am using it in my Asp.Net Core.
https://magick.codeplex.com/wikipage?title=Exif%20data&referringTitle=Documentation
This also looks like a good imaging library but i haven't tried it yet Cheers to the creators.

- 1,723
- 3
- 25
- 47
-
3While ImageMagick works with dotnet core, it only supports Windows, not LInux. Documentation states... "Starting with version 7.0.0.0102 support for .NET Core was added. This currently only works on Windows." – barrypicker Dec 13 '16 at 20:07
-
although ImageProcessorCore now supports EXIF read magick documentation is much better for now – Dživo Jelić Feb 09 '17 at 14:34
ImageSharp is cross platform (https://github.com/SixLabors/ImageSharp ) and worked for me on Linux out of the box. It is still in beta but for me it works OK, I am only using exif parsing capabilities

- 775
- 9
- 19
The accepted solution will (as of today) not work on Linux machines.
Therefore, I have used the source of ExifLib: https://www.codeproject.com/Articles/36342/ExifLib-A-Fast-Exif-Data-Extractor-for-NET
I slightly modified it to use Dispose() on streams and readers instead of Close(). For just reading exif data, it performs well because it reads the binary data instead of using expensive GDI objects.

- 2,607
- 2
- 16
- 22
-
The ExifLib on Nuget is not compatible with .net core - try it and it fails to install: `Install-Package : Package ExifLib 1.7.0 is not compatible with netcoreapp1.1` – gbjbaanb Aug 09 '17 at 23:25
-
That is true, however, almost nothing in the source code uses namespaces that aren't available in .net core. When using the source (and using Dispose on streams), it works like a charm. – Nullius Aug 19 '17 at 08:22
-
2Fair enough, but the Nuget package is still broken and needs updating. Also "almost nothing" is significantly not the same as "nothing" :) – gbjbaanb Aug 19 '17 at 15:25
-
It's now been ported to .net Standard/.net Core. https://www.nuget.org/packages/ExifLib.Standard/ – Doug S May 17 '18 at 03:27
I used Magick.NET.Core, it has much more capabilities than EXIF,
The source code can be found here - github library: https://www.nuget.org/packages/Magick.NET.Core/
And the specific EXIF documentation: https://github.com/dlemstra/Magick.NET/blob/main/docs/ExifData.md

- 2,167
- 1
- 18
- 10