fix with crop-before-resize and upscaling=false

If images gets cropped-before-resize, upscaling is not allowed, and the resulting dimensions from crop-before-resize are equal or smaller than the target-dimensions, the memory image wasn't saved to diskfile. This PR resolves that issue.