use if instead of case for conditional
fix warning: ignore args
switch between width and height reduction