简体   繁体   English

使用LibTiff.Net从tif图像中获取tiff标签计数的最佳/最快方法是什么?

[英]What's the best/fastest way to get the count of tiff tags from a tif image with LibTiff.Net?

Just as stated in the title, what is the best and fastest way to get the count of tiff tags in an image? 正如标题中所述,获取图像中tiff标签数量的最佳和最快方法是什么?

Currently the only way I know of is trying to query tags 1-65534 using the GetField() method and simply counting that way. 目前,我所知道的唯一方法是尝试使用GetField()方法查询标签1-65534并简单地进行计数。 Is there some type of array or list of tags that I can access from the Tiff object in the LibTiff.Net library? 我可以从LibTiff.Net库中的Tiff对象访问某种类型的数组或标签列表吗?

Your current approach is the only one available through API. 您当前的方法是唯一可以通过API使用的方法。 So, obviously, it's the fastest one. 因此,显然,这是最快的一种。

Tiff class maintains internal representation of current image directory (page). Tiff类维护当前图像目录(页面)的内部表示。 This information contains all found tags. 此信息包含所有找到的标签。 But probably it's not worth the hassle to try to get to that information. 但是,尝试获取这些信息可能不值得麻烦。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM