--- gravatar.module	2008-08-23 14:09:46.000000000 -0500
+++ gravatar.patched.module	2008-08-23 14:18:18.000000000 -0500
@@ -114,10 +114,15 @@ function gravatar_preprocess_user_pictur
     }
     // or classic picture ?
     if (!empty($picture)) {
-      // enforce max dimensions for default image, too
-      $real = getimagesize($picture);
+      // The following code only runs when the $picture variable is 
+      // the default picture. The user.module doesn't enforce
+      // dimensions, but we're going to enforce it here.
+      // Really this should be just be:
+      // $variables['picture'] = theme('image', $picture, $alt, $alt, '', FALSE);
+      // to emulate what the user.module does with default pictures.
       $dimension = explode('x', variable_get('user_picture_dimensions', '85x85'));
-      $variables['picture'] = theme('image', $picture, $alt, $alt, array('width' => min($dimension[0], $real[0]), 'height' => min($dimension[0], $real[0])), FALSE);
+      $real = is_file($picture) ? getimagesize($picture) : $dimension;
+      $variables['picture'] = theme('image', $picture, $alt, $alt, array('width' => min($dimension[0], $real[0]), 'height' => min($dimension[1], $real[1])), FALSE);
     }
     
     // enable link to user profile whether gravatar is enabled or not
@@ -219,6 +224,7 @@ function gravatar_get_gravatar($email) {
       // drupal default picture
       case 1:
         $path = variable_get('user_picture_default', '');
+        $path = url($path, array('absolute' => TRUE));
         $gravatar .= '?d='. urlencode($path);
         break;
       // gravatar module default picture
