Fix crop and scale conditions

When there is nothing to resize or crop, those operations should be skipped.