Constraining portrait orientation photos to max height of landscape max width