diff -du old/gnome-thumbnail.c new/gnome-thumbnail.c
--- old/gnome-thumbnail.c	2006-12-03 16:50:53.000000000 -0800
+++ new/gnome-thumbnail.c	2006-12-03 17:06:37.000000000 -0800
@@ -986,19 +986,21 @@
 	pixbuf = _gnome_thumbnail_load_scaled_jpeg (uri, size, size);
       else
 #endif
-	pixbuf = gnome_gdk_pixbuf_new_from_uri_at_scale (uri, size, size, TRUE);
+	width = size;
+	height = size;
+	pixbuf = gnome_gdk_pixbuf_new_from_uri_at_scale_full (uri, &width, &height, TRUE);
     }
       
   if (pixbuf == NULL)
     return NULL;
 
-  width = gdk_pixbuf_get_width (pixbuf);
   g_object_set_data_full (G_OBJECT (pixbuf), "gnome-thumbnail-width",
 			  g_strdup_printf ("%d", width), g_free);
-  height = gdk_pixbuf_get_height (pixbuf);
   g_object_set_data_full (G_OBJECT (pixbuf), "gnome-thumbnail-height",
 			  g_strdup_printf ("%d", height), g_free);
 
+  width = gdk_pixbuf_get_width (pixbuf);
+  height = gdk_pixbuf_get_height (pixbuf);
   if (width > size || height > size)
     {
       scale = (double)size / MAX (width, height);
diff -du old/gnome-vfs-util.c new/gnome-vfs-util.c
--- old/gnome-vfs-util.c	2006-12-03 16:19:29.000000000 -0800
+++ new/gnome-vfs-util.c	2006-12-03 17:06:42.000000000 -0800
@@ -102,6 +102,11 @@
 {
 	SizePrepareContext *info = data;
 
+	int original_width, original_height;
+
+	original_width = width;
+	original_height = height;
+
 	g_return_if_fail (width > 0 && height > 0);
 
 	if (width < info->width && height < info->height) return;
@@ -134,6 +139,8 @@
 	}
 	
 	gdk_pixbuf_loader_set_size (loader, width, height);
+	info->width = original_width;
+	info->height = original_height;
 }
 
 /**
@@ -160,6 +167,18 @@
 					gint        height,
 					gboolean    preserve_aspect_ratio)
 {
+	return gnome_gdk_pixbuf_new_from_uri_at_scale_full(uri,
+                       &width,
+                       &height,
+                       preserve_aspect_ratio);
+}
+
+GdkPixbuf *
+gnome_gdk_pixbuf_new_from_uri_at_scale_full (const char *uri,
+					gint*        width,
+					gint*        height,
+					gboolean    preserve_aspect_ratio)
+{
     GnomeVFSResult result;
     GnomeVFSHandle *handle;
     char buffer[LOAD_BUFFER_SIZE];
@@ -169,6 +188,8 @@
     SizePrepareContext info;
 
     g_return_val_if_fail (uri != NULL, NULL);
+    g_return_val_if_fail (width != NULL, NULL);
+    g_return_val_if_fail (height != NULL, NULL);
 
     result = gnome_vfs_open (&handle,
 			     uri,
@@ -178,9 +199,9 @@
     }
 
     loader = gdk_pixbuf_loader_new ();
-    if (1 <= width || 1 <= height) {
-        info.width = width;
-        info.height = height;
+    if (1 <= *width || 1 <= *height) {
+        info.width = *width;
+        info.height = *height;
         info.preserve_aspect_ratio = preserve_aspect_ratio;        
         g_signal_connect (loader, "size-prepared", G_CALLBACK (size_prepared_cb), &info);
     }
@@ -220,6 +241,8 @@
     }
     g_object_unref (G_OBJECT (loader));
 
+	*width = info.width;
+	*height = info.height;
     return pixbuf;
 }
 
diff -du old/gnome-vfs-util.h new/gnome-vfs-util.h
--- old/gnome-vfs-util.h	2006-12-03 17:01:04.000000000 -0800
+++ new/gnome-vfs-util.h	2006-12-03 17:06:13.000000000 -0800
@@ -64,6 +64,10 @@
                                        gint                        height,
                                        gboolean                    preserve_aspect_ratio);
 
+gnome_gdk_pixbuf_new_from_uri_at_scale_full (const char                 *uri,
+                                       gint                        *width,
+                                       gint                        *height,
+                                       gboolean                    preserve_aspect_ratio);
 /* Same thing async. */
 GnomeGdkPixbufAsyncHandle *
 gnome_gdk_pixbuf_new_from_uri_async  (const char                 *uri,
