ImageDctHashSearchCriteria class
Leave feedback
On this page
Represents a search criteria for finding images in a document.
This search criteria uses DCT based perceptual image hash for calculating image similarity. Learn more: https://docs.groupdocs.com/display/watermarknet/Searching+watermarks
The ImageDctHashSearchCriteria type exposes the following members:
| Constructor | Description |
|---|---|
| init | Initializes a new ImageDctHashSearchCriteria instance with a specified file path. |
| init | Initializes a new ImageDctHashSearchCriteria instance with the provided image stream. |
| 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 the logical OR operator. (inherited from SearchCriteria) |
| or_search_criteria | (inherited from SearchCriteria) |
| Property | Description |
|---|---|
| max_difference | The maximum allowed difference between images. (inherited from ImageSearchCriteria) |
| pages | The list of specific page numbers. (inherited from PageSearchCriteria) |
from groupdocs.watermark import Watermarker
from groupdocs.watermark.search.search_criteria import ImageDctHashSearchCriteria
def clear_image_watermark():
with Watermarker("./watermarked-document.docx") as watermarker:
criteria = ImageDctHashSearchCriteria("./logo.png")
criteria.max_difference = 0.9
possible = watermarker.search(criteria)
for i in range(len(possible) - 1, -1, -1):
watermarker.remove(possible[i])
watermarker.save("./output.docx")
Task guides that use ImageDctHashSearchCriteria:
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.