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