Overhaul how filtering the dimensions works.  Drop support for the 'height' argument and base everything off the 'width' argument.  Default this argument to the theme's $content_width.  Let the script handle the ratio based off the original media's width and height attributes.  This way, themes can use a custom width for media but have the script automatically update the height.