←选择平台

评论属性

总结
评论数据的收集阅读和写作时使用特定的文件格式(包括GIF)。
语法
c#
VB
objective - c
c++
Java
公共ObservableCollection <RasterCommentMetadata{>评论得到;}
公共只读的财产评论作为ObservableCollection (RasterCommentMetadata)
@ property(原子、分配、只读的、可以为空)NSMutableArray < LTRasterCommentMetadata * > *评论
公共< RasterCommentMetadata > getComments列表()
公共:财产ObservableCollection < RasterCommentMetadata ^ > ^{评论ObservableCollection < RasterCommentMetadata ^ > ^ get ();}

属性值

的集合RasterCommentMetadata阅读和写作时使用特定的文件格式(包括GIF)。

讲话

等格式允许您存储非图像数据评论、标签和标记。

你可以操纵图像通过添加/删除的评论RasterCommentMetadata对象集合。

通过设置CodecsSaveOptions.Comments属性为true调用之前RasterCodecs.Save在评论,你可以保存在这个集合图像保存到一个文件中。

通过设置CodecsLoadOptions.Markers属性为true调用之前RasterCodecs.Load,你可以加载所有的标记(如果有的话)到这个集合图像时从文件加载。

您可以使用RasterCodecs.WriteMarkers方法将标记直接保存到一个现有的文件。

有关更多信息,请参考非图像数据类型的文件的评论

例子
c#
VB
使用Leadtools;使用Leadtools.Codecs;使用Leadtools.ImageProcessing;使用Leadtools.ImageProcessing.Core;使用Leadtools.ImageProcessing.Color;使用Leadtools.Dicom;使用Leadtools.Drawing;使用Leadtools.Controls;使用Leadtools.Svg;私人无效DisplayComment (RasterCommentMetadata评论){开关(comment.DataType){情况下RasterCommentMetadataDataType.Ascii:MessageBox.Show (“类型”的评论+ + comment.Type.ToString ()“=”+ comment.ToAscii ());打破;}}公共无效CommentsExample (){RasterCodecs编解码器=RasterCodecs ();RasterImage图像= codecs.Load (Path.Combine (LEAD_VARS.ImagesDir,“IMAGE1.CMP”));/ / AsciiRasterCommentMetadata commentDataAscii =RasterCommentMetadata ();/ /设置艺术家发表评论commentDataAscii。类型= RasterCommentMetadataType.Artist;commentDataAscii.FromAscii (“测试字符串”);image.Comments.Add (commentDataAscii);codecs.Options.Save。评论=真正的;编解码器。保存(形象,Path.Combine (LEAD_VARS.ImagesDir“IMAGE1_COMMENTS.TIF”),RasterImageFormat。Tif, 0);/ /加载评论的照片RasterCommentMetadata评论= codecs.ReadComment (Path.Combine (LEAD_VARS.ImagesDir,“IMAGE1_COMMENTS.TIF”),1,RasterCommentMetadataType.Artist);DisplayComment(评论);codecs.Dispose ();}静态LEAD_VARS{公共常量字符串ImagesDir =@“C: \ LEADTOOLS21 \ Resources \图片”;}
进口Leadtools进口Leadtools.Codecs进口Leadtools.ImageProcessing进口Leadtools.ImageProcessing.Core进口Leadtools.ImageProcessing.Color进口Leadtools.Controls进口Leadtools.Dicom进口Leadtools.Drawing进口Leadtools.Svg私人DisplayComment (按值传递评论作为RasterCommentMetadata)选择情况下comment.DataType情况下RasterCommentMetadataDataType.AsciiMessageBox.Show (“类型”的评论& & comment.Type.ToString ()“=”& comment.ToAscii ())结束选择结束公共CommentsExample ()昏暗的编解码器作为RasterCodecs =RasterCodecs ()昏暗的图像作为RasterImage = codecs.Load (Path.Combine (LEAD_VARS.ImagesDir“IMAGE1.CMP”))“Ascii昏暗的commentDataAscii作为RasterCommentMetadata =RasterCommentMetadata ()“艺术家的评论commentDataAscii。类型= RasterCommentMetadataType.ArtistcommentDataAscii.FromAscii (“测试字符串”)image.Comments.Add (commentDataAscii)codecs.Options.Save。评论=真正的编解码器。保存(形象,Path.Combine (LEAD_VARS.ImagesDir“IMAGE1_COMMENTS.TIF”),RasterImageFormat。Tif, 0)加载评论的照片昏暗的评论作为RasterCommentMetadata = codecs.ReadComment (Path.Combine (LEAD_VARS.ImagesDir“IMAGE1_COMMENTS.TIF”),1RasterCommentMetadataType.Artist)DisplayComment(评论)codecs.Dispose ()结束公共NotInheritableLEAD_VARS公共常量ImagesDir作为字符串=“C: \ LEADTOOLS21 \ Resources \图片”结束
需求

目标平台

另请参阅

参考

RasterImage类

RasterImage成员

Leadtools组装
188金宝搏的网址客服|支持|联系我们|知识产权的通知
©1991 - 2021领先的技术公司。保留所有权利。