How can i read EXIF data in AspNet.Core
Asked Answered
S

5

13

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?

Stop answered 21/7, 2016 at 13:29 Comment(6)
quite a few of them: nuget.org/packages?q=exifCrossbar
are 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 coreMun
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.Crossbar
Found one on .NETStandard 1.5 nuget.org/packages/NExifToolCrossbar
Yes it ok has nice api but it requires sno.phy.queensu.ca/~phil/exiftool/install.html tool to be installed i am trying to do it on my local serverMun
@salitio i am not sure that i can do it on my own i will tryMun
S
4

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.

Stop answered 22/7, 2016 at 17:34 Comment(2)
While 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."Wizen
although ImageProcessorCore now supports EXIF read magick documentation is much better for nowMun
D
7

The lightweight ExifLib has now been ported to .net Standard/.net Core.

I have confirmed it also works on Linux.

https://www.nuget.org/packages/ExifLib.Standard/

Decarbonize answered 17/5, 2018 at 3:29 Comment(0)
S
4

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.

Stop answered 22/7, 2016 at 17:34 Comment(2)
While 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."Wizen
although ImageProcessorCore now supports EXIF read magick documentation is much better for nowMun
S
4

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

Sling answered 18/1, 2018 at 5:34 Comment(0)
R
3

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.

Rooky answered 9/2, 2017 at 8:23 Comment(4)
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.1Ianthe
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.Rooky
Fair enough, but the Nuget package is still broken and needs updating. Also "almost nothing" is significantly not the same as "nothing" :)Ianthe
It's now been ported to .net Standard/.net Core. nuget.org/packages/ExifLib.StandardDecarbonize
M
1

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

Magnanimous answered 26/3, 2021 at 18:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.