Add functionality too keep aspect ratio and demo canvas code.