Solve for max width
 
Original
Proportions
 
Constrained
Proportions
px

px
Height

Width

px
 






Solve by max height instead