Welcome Guest! To enable all features, please Login or Register.



Last Go to last post Unread Go to first unread post
#1 Posted : Monday, September 10, 2018 12:51:52 PM(UTC)
Anthony Northrup

Groups: Registered, Tech Support, Administrators
Posts: 199

Was thanked: 28 time(s) in 28 post(s)

The LEADTOOLS v20 SDK supports both importing from and exporting to TIFF tag Wang annotations. For further information about this support, refer to the following page:

TIFF Tag Wang Annotations to LEADTOOLS' AnnObjects: (loading from TIFF tags)
Loading is extremely straight forward, and can be done using the AnnCodecs.LoadAll method. Below is all you'll need:

static AnnContainer[] WangTagToLEAD(string tifFile)
	AnnCodecs annCodecs = new AnnCodecs();
	return annCodecs.LoadAll(tifFile);

LEADTOOLS' AnnObjects to TIFF Tag Wang Annotations: (saving to TIFF tags)
Saving is a two step process. You must first generate the tag, a RasterTagMetadata object, using the AnnCodecs.SaveToTag method. Next, for write each tag to a file using the RasterCodecs.WriteTag method:

static void LEADToWangTag(IEnumerable<AnnContainer> containers, string tifFile)
	AnnCodecs annCodecs = new AnnCodecs();
	int page = 1;
	using (RasterCodecs rasterCodecs = new RasterCodecs())
		foreach (AnnContainer container in containers)
			RasterTagMetadata tag = annCodecs.SaveToTag(container, page, true);
			rasterCodecs.WriteTag(tifFile, page, tag);
Anthony Northrup
Developer Support Engineer
LEAD Technologies, Inc.


Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.034 seconds.