←Select platform

CommentsSupported Method

Summary

Checks whether the given file format supports comment fields

Syntax

C#
VB
Java
Objective-C
WinRT C#
C++
public static bool CommentsSupported( 
   RasterImageFormat format 
) 
Public Shared Function CommentsSupported( _ 
   ByVal format As Leadtools.RasterImageFormat _ 
) As Boolean 
public static bool CommentsSupported(  
   Leadtools.RasterImageFormat format 
) 
+ (BOOL)commentsSupported:(LTRasterImageFormat)format 
public static boolean commentsSupported(RasterImageFormat format) 
 function Leadtools.Codecs.RasterCodecs.CommentsSupported(  
   format  
) 
public: 
static bool CommentsSupported(  
   Leadtools.RasterImageFormat format 
)  

Parameters

format
The RasterImageFormat to check

Return Value

true if the format supports comment fields; otherwise it is false.

Remarks

This is a helper method that can be used to detect if a certain raster file format supports comment fields. For example, ReadComment and ReadComments 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.

Example

For an example, refer to ReadTags.

Requirements

Target Platforms

Help Version 19.0.2017.10.18
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Codecs Assembly