Added so that you only have to provide the maxWidth in case you don't want to use the maxHeight option. Also fixes some backwards compatibility.
Quickly fixed so that the example project works with the latest commit.