Adding max width/height for display in the canvas