Class CropToSquare
java.lang.Object
is.galia.operation.Crop
is.galia.operation.CropToSquare
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetRegion
(Size reducedSize, ReductionFactor reductionFactor, ScaleConstraint scaleConstraint) Computes an effective crop rectangle in source image coordinates.boolean
May produce false positives.boolean
hasEffect
(Size fullSize, OperationList opList) Context-aware counterpart toOperation.hasEffect()
.toString()
Methods inherited from class is.galia.operation.Crop
equals, freeze, getRegion, getRegion, getResultingSize, hashCode, toMap, validate
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface is.galia.operation.Operation
freeze, getResultingSize, toMap, validate
-
Constructor Details
-
CropToSquare
public CropToSquare()
-
-
Method Details
-
getRegion
public Region getRegion(Size reducedSize, ReductionFactor reductionFactor, ScaleConstraint scaleConstraint) Description copied from class:Crop
Computes an effective crop rectangle in source image coordinates.- Specified by:
getRegion
in classCrop
- Parameters:
reducedSize
- Size of the input image, reduced byreductionFactor
.reductionFactor
- Factor by which the full-sized image has been reduced to becomereducedSize
.scaleConstraint
- Scale constraint yet to be applied to the input image. The instance is expressed relative to this constraint rather than toreducedSize
or the full image size.- Returns:
- Region relative to the given reduced dimensions.
-
hasEffect
public boolean hasEffect()May produce false positives.hasEffect(Size, OperationList)
should be used instead where possible. -
hasEffect
Description copied from interface:Operation
Context-aware counterpart toOperation.hasEffect()
. For example, a scale operation specifying a scale to 300×200, when the given operation list contains a crop of 300×200, would returnfalse
. -
toString
-