[英]How can i read EXIF data in AspNet.Core
What's the best way to read EXIF info of a picture in Asp.Net Core.在 Asp.Net Core 中读取图片的 EXIF 信息的最佳方法是什么。 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?
我正在使用 myget 中的 ImageProcessorCore alpha 来旋转图片,但我还没有找到读取 exif 数据的方法,库中是否有这样做的方法?
The lightweight ExifLib has now been ported to .net Standard/.net Core.轻量级 ExifLib 现在已移植到 .net Standard/.net Core。
I have confirmed it also works on Linux.我已经确认它也适用于 Linux。
https://www.nuget.org/packages/ExifLib.Standard/ https://www.nuget.org/packages/ExifLib.Standard/
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.我能够找到一个读取 exif 信息的库,它可用于 .net 核心,我在我的 Asp.Net 核心中使用它。
https://magick.codeplex.com/wikipage?title=Exif%20data&referringTitle=Documentation https://magick.codeplex.com/wikipage?title=Exif%20data&referringTitle=文档
This also looks like a good imaging library but i haven't tried it yet Cheers to the creators.这看起来也是一个不错的图像库,但我还没有尝试过 为创作者干杯。
ImageSharp is cross platform ( https://github.com/SixLabors/ImageSharp ) and worked for me on Linux out of the box. ImageSharp 是跨平台的 ( https://github.com/SixLabors/ImageSharp ),并且在 Linux 上为我开箱即用。 It is still in beta but for me it works OK, I am only using exif parsing capabilities
它仍处于测试阶段,但对我来说它工作正常,我只使用 exif 解析功能
The accepted solution will (as of today) not work on Linux machines.已接受的解决方案(截至今天)不适用于 Linux 机器。
Therefore, I have used the source of ExifLib: https://www.codeproject.com/Articles/36342/ExifLib-A-Fast-Exif-Data-Extractor-for-NET因此,我使用了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().我稍微修改了它以在流和读取器上使用 Dispose() 而不是 Close()。 For just reading exif data, it performs well because it reads the binary data instead of using expensive GDI objects.
对于仅读取 exif 数据,它表现良好,因为它读取二进制数据而不是使用昂贵的 GDI 对象。
I used Magick.NET.Core , it has much more capabilities than EXIF,我使用了Magick.NET.Core ,它比 EXIF 有更多的功能,
The source code can be found here - github library: https://www.nuget.org/packages/Magick.NET.Core/源代码可以在这里找到 - github 库: https : //www.nuget.org/packages/Magick.NET.Core/
And the specific EXIF documentation: https://github.com/dlemstra/Magick.NET/blob/main/docs/ExifData.md以及具体的 EXIF 文档: https : //github.com/dlemstra/Magick.NET/blob/main/docs/ExifData.md
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.