ImageThumbnailSearchCriteria Class
Represents search criteria for finding images in a document. This search criteria uses image binarized thumbnail for calculating image similarity.
Inheritance Hierarchy

Namespace: GroupDocs.Watermark.Search
Assembly: GroupDocs.Watermark (in GroupDocs.Watermark.dll) Version: 19.5
Syntax
public class ImageThumbnailSearchCriteria : ImageSearchCriteria

The ImageThumbnailSearchCriteria type exposes the following members.

Constructors
  NameDescription
Public methodImageThumbnailSearchCriteria(Stream)
Initializes a new instance of the ImageThumbnailSearchCriteria class.
Public methodImageThumbnailSearchCriteria(String)
Initializes a new instance of the ImageThumbnailSearchCriteria class.
Properties
  NameDescription
Public propertyMaxDifference
Gets or sets maximum allowed difference between images.
(Inherited from ImageSearchCriteria.)
Public propertyThumbnailSize
Gets or sets thumbnail size.
Methods
  NameDescription
Public methodAnd
Combines this SearchCriteria with other criteria using logical AND operator.
(Inherited from SearchCriteria.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodNot
Negates this SearchCriteria.
(Inherited from SearchCriteria.)
Public methodOr
Combines this SearchCriteria with other criteria using logical OR operator.
(Inherited from SearchCriteria.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Examples
Find and remove all possible watermarks containing a particular raster image from a document of any supported format.
C#
ImageSearchCriteria imageSearchCriteria = new ImageThumbnailSearchCriteria(@"D:\logo.png");
imageSearchCriteria.MaxDifference = 0.1;

foreach (string file in Directory.GetFiles(@"D:\docs"))
{
    using (Document doc = Document.Load(file))
    {
        var watermarks = doc.FindWatermarks(imageSearchCriteria);
        watermarks.Clear();
        doc.Save();
    }
}
See Also