private IMOperation getImOperation() {
        IMOperation imOp = new IMOperation();
        imOp.addImage("-");
        if (iMagickSettings.isUnsharpMaskEnabled()) {
            double radius = iMagickSettings.getUnsharpMaskRadius();
            double sigma = Math.sqrt(radius);
            imOp.unsharp(radius, sigma,
                    iMagickSettings.getUnsharpMaskAmount() * 0.01);
        }
        if (imageDimensions.isFitToView()) {
            imOp.resize(imageDimensions.getWidth(), imageDimensions.getHeight());
        } else if (imageDimensions.getWidth() < 50) {
            imOp.resize(imageDimensions.getWidth() * 2,
                    imageDimensions.getHeight() * 2, '%');
        }
        if (iMagickSettings.isSigmoidalContrastEnabled()) {
            imOp.addRawArgs("-sigmoidal-contrast", String.format("%d,%d%%",
                    iMagickSettings.getSigmoidalContrastAmount(),
                    iMagickSettings.getSigmoidalContrastMidpoint()));
        }
        if (iMagickSettings.isSaturationEnabled()) {
            imOp.modulate(100.0, (double) iMagickSettings.getSaturationAmount());
        }
        if (iMagickSettings.isNormalizationEnabled()) {
            imOp.normalize();
        }
        imOp.addImage("png:-");
        return imOp;
    }