Dynamic Page -- Image uploads, variable sizing

Hi all:
I am working on creating a dynamic page that will display an image (artwork) that is uploaded by individual site members. The sizing and orientation (vertical and horizontal) may change from upload to upload – and I am looking to see if there is a way to deal with the different upload variations. I essentially want a vertical upload to display on the page vertically, and the horizontal uploads to display horizontally. I am willing to put black bumpers on each side of a vertically oriented image if need be – just not sure how to handle this.

Any advice on this would be great. Thanks.