If the frame_size width or height is 0, just return the current size to avoid calculations involving divison by 0.