ImageDctHashSearchCriteria class

ImageDctHashSearchCriteria class

Represents a search criteria for finding images in a document.

This search criteria uses DCT‑based perceptual image hash for calculating image similarity.

The ImageDctHashSearchCriteria type exposes the following members:

Constructors

Constructor Description
init Initializes a new instance of the ImageDctHashSearchCriteria class with a specified file path.
init Initializes a new instance of the ImageDctHashSearchCriteria class with a specified stream.

Methods

Method Description
and_ Combines this SearchCriteria with other criteria using the logical AND operator. (inherited from SearchCriteria)
and_search_criteria (inherited from SearchCriteria)
not_ Negates this SearchCriteria. (inherited from SearchCriteria)
or_ Combines this SearchCriteria with other criteria using logical OR operator. (inherited from SearchCriteria)
or_search_criteria (inherited from SearchCriteria)

Properties

Property Description
max_difference The maximum allowed difference between images. (inherited from ImageSearchCriteria)
pages The list of specific page numbers. (inherited from PageSearchCriteria)

Example

import groupdocs.watermark as gw
import groupdocs.watermark.search.searchcriteria as gws_sc

with gw.Watermarker("watermarked-sample.docx") as watermarker:
    criteria = gws_sc.ImageDctHashSearchCriteria("logo.png")
    criteria.max_difference = 0.9
    possible = watermarker.search(criteria)
    possible.clear()
    watermarker.save("clean-sample.docx")

Guides

Task guides that use ImageDctHashSearchCriteria:

See Also