Action to resize to a dimension that fits within a set size?
I'm struggling to figure out the best way to resize images so that they fit with set maximum parameters. I'm thinking an action is probably the best way to do this?
Let's say a maximum 1200px, max height of 900px.
I want to maintain the aspect ratio and don't mind if I end up with 1200w x 400h, or 800h x 900w as neither max dimension has been exceeded. I can do one or the other, but haven't figured out how best to do both. I can only imagine this is a common thing to want to do, but I'm probably using the wrong search terms or have fundamentally overlooked something which is obvious to others (but not to me!)
Thanks!
