ImageDctHashSearchCriteria Class
Represents a search criteria for finding images in a document.
Inheritance Hierarchy

Namespace: GroupDocs.Watermark.Search.SearchCriteria
Assembly: GroupDocs.Watermark (in GroupDocs.Watermark.dll) Version: 20.7.0
Syntax
public class ImageDctHashSearchCriteria : ImageSearchCriteria

The ImageDctHashSearchCriteria type exposes the following members.

Constructors
  NameDescription
Public methodImageDctHashSearchCriteria(Stream)
Initializes a new instance of the ImageDctHashSearchCriteria class with a specified stream.
Public methodImageDctHashSearchCriteria(String)
Initializes a new instance of the ImageDctHashSearchCriteria class with a specified file path.
Properties
  NameDescription
Public propertyMaxDifference
Gets or sets maximum allowed difference between images.
(Inherited from ImageSearchCriteria.)
Methods
  NameDescription
Public methodAnd
Combines this SearchCriteria with other criteria using logical AND operator.
(Inherited from SearchCriteria.)
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (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 (Inherited from Object.)
Remarks
This search criteria uses DCT based perceptual image hash for calculating image similarity. Learn more:
Examples
Search for images in the attached files (pdf).
C#
WatermarkerSettings settings = new WatermarkerSettings();
settings.SearchableObjects = new SearchableObjects
{
    PdfSearchableObjects = PdfSearchableObjects.All
};
PdfLoadOptions loadOptions = new PdfLoadOptions();
using (Watermarker watermarker = new Watermarker(@"D:\test.pdf", loadOptions, settings))
{
    // Specify sample image to compare document images with
    ImageSearchCriteria criteria = new ImageDctHashSearchCriteria(@"D:\sample.png");
    // Search for similar images
    PossibleWatermarkCollection possibleWatermarks = watermarker.Search(criteria);
    // Remove or modify found image watermarks
    // ...
}
See Also