class ScaleToNearestFactorPreprocessor extends ScalePreprocessor {

    @Override
    public void process() {
        if (widthFactor1 < THRESHOLD || heightFactor1 < THRESHOLD || widthFactor2 < THRESHOLD ||
                heightFactor2 < THRESHOLD) {
            LOGGER.info("Scaling image with factors [{}], [{}]", widthFactor1, heightFactor1);
            super.process();
        } else {
            LOGGER.info("All scale factors [{}], [{}], [{}], [{}] are above threshold [{}]", widthFactor1,
                        heightFactor1, widthFactor2, heightFactor2, THRESHOLD);
            result1 = img1;
            result2 = img2;
        }
    }

    public  ScaleToNearestFactorPreprocessor(final BufferedImage img1, final BufferedImage img2, int targetSize);

}