public class SizeSearchCriteria extends SearchCriteria
Learn more:
The following example demonstrates how to find and remove watermarks using search criteria.
Watermarker watermarker = new Watermarker("C:\\test.some_ext"); SizeSearchCriteria widthRange = new SizeSearchCriteria(Dimension.Width, 50, 100); RotateAngleSearchCriteria rotateAngle = new RotateAngleSearchCriteria(0, 45); TextSearchCriteria textCriteria = new TextSearchCriteria(Pattern.compile("^Test watermark$")); PossibleWatermarkCollection watermarks = watermarker.search(textCriteria.and(widthRange.or(rotateAngle))); watermarks.clear(); watermarker.save("C:\\modified_test.some_ext"); watermarker.close();
| Constructor and Description |
|---|
SizeSearchCriteria(int dimension,
double min,
double max)
Initializes a new instance of the
class
with a specified dimension, a starting value and an ending value. |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(ICriteriaVisitor visitor) |
int |
getDimension()
Gets the dimension of watermark to search by.
|
double |
getMaximum()
Gets the ending value.
|
double |
getMinimum()
Gets the starting value.
|
boolean |
isSatisfiedBy(PossibleWatermark candidate) |
and, not, orpublic SizeSearchCriteria(int dimension,
double min,
double max)
SizeSearchCriteria class
with a specified dimension, a starting value and an ending value.dimension - The dimension Dimension of a watermark to search by.min - The starting value.max - The ending value.public void accept(ICriteriaVisitor visitor)
accept in class SearchCriteriapublic final int getDimension()
Gets the dimension of watermark to search by.
public final double getMaximum()
Gets the ending value.
public final double getMinimum()
Gets the starting value.
public boolean isSatisfiedBy(PossibleWatermark candidate)
isSatisfiedBy in class SearchCriteriaCopyright © 2026. All rights reserved.