WordPress Function to Detect if is a Photo is Panoramic

When managing photos on a photoblog, I find that I often need to detect panoramia so as to accommodate the boisterous dimensions. Here’s the gist:

Who cares?

I use this function to grab the image in a size specifically for panoramas. In my case, I want panoramas in a width that is either equal to or double the content width. I might want it in double the content width to please retina monitors.