Index: imagecache.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/imagecache/imagecache.module,v
retrieving revision 1.54
diff -u -8 -p -w -u -p -r1.54 imagecache.module
--- imagecache.module	21 Feb 2008 12:44:54 -0000	1.54
+++ imagecache.module	27 Feb 2008 13:23:23 -0000
@@ -521,16 +521,20 @@ function imagecache_field_formatter_info
     $formatters[$preset['presetname'] .'_linked'] = array(
       'label' => t('@preset as link to node', array('@preset' => $preset['presetname'])),
       'field types' => array('image'),
     );
     $formatters[$preset['presetname'] .'_imagelink'] = array(
       'label' => t('@preset as link to image', array('@preset' => $preset['presetname'])),
       'field types' => array('image'),
     );
+    $formatters[$preset['presetname'] .'_source'] = array(
+      'label' => t('@preset source', array('@preset' => $preset['presetname'])),
+      'field types' => array('image'),
+    );
   }
   return $formatters;
 }
 
 /**
  * Implementation of hook_field_formatter().
  */
 function imagecache_field_formatter($field, $item, $formatter) {
@@ -540,16 +544,17 @@ function imagecache_field_formatter($fie
   // Views does not load the file for us, while CCK display fields does.
   if (!isset($item['filepath'])) {
     $item = array_merge($item,  _imagecache_file_load($item['fid']));
   }
 
   $presetname = $formatter;
   $presetname = preg_replace('/_linked$/', '', $presetname);
   $presetname = preg_replace('/_imagelink$/', '', $presetname);
+  $presetname = preg_replace('/_source$/', '', $presetname);
   if ($preset = imagecache_preset_by_name($presetname)) {
     return theme('imagecache_formatter', $field, $item, $presetname);
   }
 }
 
 function _imagecache_file_load($fid = NULL) {
   // Don't bother if we weren't passed an fid.
   if (isset($fid) && is_numeric($fid)) {
@@ -643,16 +648,20 @@ function theme_imagecache_formatter($fie
     $formatter = preg_replace('/_linked$/', '', $formatter);
     $image = theme('imagecache', $formatter, $item['filepath'], $item['alt'], $item['title']);
     $output = l($image, 'node/'. $item['nid'], array(), NULL, NULL, FALSE, TRUE);
   }
   else if (preg_match('/_imagelink$/', $formatter)) {
     $formatter = preg_replace('/_imagelink$/', '', $formatter);
     $output = theme('imagecache_imagelink', $formatter, $item['filepath'], $item['alt'], $item['title']);
   }
+  else if (preg_match('/_source$/', $formatter)) {
+    $formatter = preg_replace('/_source$/', '', $formatter);
+    $output = imagecache_create_url($formatter, $item['filepath']);
+  }
   else {
     $output = theme('imagecache', $formatter, $item['filepath'], $item['alt'], $item['title']);
   }
   return $output;
 }
 
 function theme_imagecache($namespace, $path, $alt = '', $title = '', $attributes = NULL) {
   $attributes = drupal_attributes($attributes);
