public int Count { get; }
@property (nonatomic, assign, readonly) NSUInteger count;
public int getCount()
public:
property int Count {
int get();
}
Count # get (CodecsEnumTagsEventArgs)
The number of elements of type MetadataType. Note that this is not the same as the number of bytes. For example, if Countis 10 and MetadataType is RasterTagMetadataDataType.Int32, you will need 10 x 4 = 40 bytes to read the tag data. The default value is 0
.
using Leadtools;
using Leadtools.Codecs;
using Leadtools.ImageProcessing;
using Leadtools.ImageProcessing.Color;
using Leadtools.Svg;
string tagsFileName;
IList<RasterTagMetadata> myTags;
void EnumTagsExample(string srcFileName, string destFileName)
{
RasterCodecs codecs = new RasterCodecs();
tagsFileName = srcFileName;
myTags = new List<RasterTagMetadata>();
codecs.TagFound += new EventHandler<CodecsEnumTagsEventArgs>(codecs_TagFound);
codecs.EnumTags(srcFileName, 1);
codecs.TagFound -= new EventHandler<CodecsEnumTagsEventArgs>(codecs_TagFound);
// We read all the tags now, save them to the file
Debug.WriteLine("{0} tags read, saving them to the destination file", myTags.Count);
codecs.WriteTags(destFileName, 1, myTags);
// Clean up
codecs.Dispose();
}
void codecs_TagFound(object sender, CodecsEnumTagsEventArgs e)
{
Debug.WriteLine("Tag: Id={0}, Count={1}, Type={2}, Cancel={3}", e.Id, e.Count, e.MetadataType, e.Cancel);
// Read this tag from the file and add it to our collection
RasterCodecs codecs = sender as RasterCodecs;
RasterTagMetadata tag = codecs.ReadTag(tagsFileName, 1, e.Id);
myTags.Add(tag);
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document