public void DeleteComment(
string fileName,
int pageNumber,
RasterCommentMetadataType type
)
Public Overloads Sub DeleteComment( _
ByVal fileName As String, _
ByVal pageNumber As Integer, _
ByVal type As RasterCommentMetadataType _
)
public:
void DeleteComment(
String^ fileName,
int pageNumber,
RasterCommentMetadataType type
)
fileName
A String containing the input file name.
pageNumber
1-based index of the page from which to read the comment.
type
The type of comment. Refer to Types of File Comments.
This function only applies to TIF, EXIF, JPEG or JPEG 2000 files.
You can use CommentsSupported to determine whether a certain file format supports comments.
using Leadtools;
using Leadtools.Codecs;
using Leadtools.ImageProcessing;
using Leadtools.ImageProcessing.Color;
using Leadtools.Svg;
public void DeleteCommentExample()
{
RasterCodecs codecs = new RasterCodecs();
string srcFileName = Path.Combine(LEAD_VARS.ImagesDir, "Test.jpg");
RasterCommentMetadataType commentType = RasterCommentMetadataType.IptcKeywords;
RasterCommentMetadata comment = codecs.ReadComment(srcFileName, 1, commentType);
if (comment == null)
Debug.WriteLine("comment is already missing!");
else
{
codecs.DeleteComment(srcFileName, 1, commentType);
comment = codecs.ReadComment(srcFileName, 1, commentType);
if (comment != null)
Debug.WriteLine("comment is still there!");
}
// Clean up
codecs.Dispose();
}
static class LEAD_VARS
{
public const string ImagesDir = @"C:\LEADTOOLS21\Resources\Images";
}
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