adding the option to enlarge image + transpose and supporting canging height and width