Do not round aspect ratio when one of its values exceed 255.

- Use the same limit everywhere for consistency.
- Add one missing cast to avoid possible overflow.