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

StackOverflow https://stackoverflow.com/questions/12223041

  •  29-06-2021
  •  | 
  •  

Just as stated in the title, what is the best and fastest way to get the count of tiff tags in an image?

Currently the only way I know of is trying to query tags 1-65534 using the GetField() method and simply counting that way. Is there some type of array or list of tags that I can access from the Tiff object in the LibTiff.Net library?

有帮助吗?

解决方案

Your current approach is the only one available through API. So, obviously, it's the fastest one.

Tiff class maintains internal representation of current image directory (page). This information contains all found tags. But probably it's not worth the hassle to try to get to that information.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top