Leadtools.Codecs Namespace > RasterCodecs Class : CommentsSupported Method |
public static bool CommentsSupported( RasterImageFormat format )
'Declaration Public Shared Function CommentsSupported( _ ByVal format As RasterImageFormat _ ) As Boolean
'Usage Dim format As RasterImageFormat Dim value As Boolean value = RasterCodecs.CommentsSupported(format)
public static bool CommentsSupported( RasterImageFormat format )
function Leadtools.Codecs.RasterCodecs.CommentsSupported( format )
public: static bool CommentsSupported( RasterImageFormat format )
This is a helper method that can be used to detect if a certain raster file format supports comment fields. For example, ReadComment(String,Int32,RasterCommentMetadataType) and ReadComments(String,Int32) can be used to read the comments stored in a file. If the file format supports comments, such as JPEG or EXIF, then these methods will successfully return the comments stored.
However, if the format does not support comments, such as BMP, an exception will be thrown by the RasterCodecs objects. You can use CommentsSupported to determine whether the file supports comments and only call the read methods if the return value is true.
Note that the RasterCodecs option uses this method internally to determine whether the file supports comments when the CodecsLoadOptions.Comments is set to true and only read the file comments if the file format supports them.
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
RasterCodecs Class
RasterCodecs Members
ReadComment(String,Int32,RasterCommentMetadataType) Method
ReadComments(String,Int32) Method
TagsSupported Method
GeoKeysSupported Method
Tags Property
RasterImage.Tags
Working with Markers
Implementing TIFF Comments and Tags
TIFF File Comments
Implementing GeoKeys (GeoTIFF tags)
Leadtools.RasterCommentMetadataType