Index: asset_wizard.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/asset/Attic/asset_wizard.inc,v
retrieving revision 1.1.2.15
diff -u -p -r1.1.2.15 asset_wizard.inc
--- asset_wizard.inc	12 May 2008 08:47:00 -0000	1.1.2.15
+++ asset_wizard.inc	24 Jul 2008 21:52:41 -0000
@@ -280,8 +280,8 @@ function asset_wizard_form($form_values 
       // Preview the image
       if(in_array($a->extension, $is_image)) {
         if(variable_get('asset_imagecache', 0)) {
-          $presets = _imagecache_get_presets();
-          $preset = $presets[variable_get('asset_imagecache', 0)];
+          $presets = imagecache_presets();
+          $preset = $presets[variable_get('asset_imagecache', 0)]['presetname'];
           $preview = theme('imagecache', $preset, str_replace("//","/", $a->filepath));
         }
         else {
@@ -664,8 +664,8 @@ function asset_wizard_form_validate($for
     // Preview the image
     if(in_array($a->extension, $is_image)) {
       if(variable_get('asset_imagecache', 0)) {
-        $presets = _imagecache_get_presets();
-        $preset = $presets[variable_get('asset_imagecache', 0)];
+        $presets = imagecache_presets();
+        $preset = $presets[variable_get('asset_imagecache', 0)]['presetname'];
         $preview = theme('imagecache', $preset, str_replace("//","/", $a->filepath));
       }
       else {
Index: modules/asset_imagecache.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/asset/modules/asset_imagecache.inc,v
retrieving revision 1.1.2.3
diff -u -p -r1.1.2.3 asset_imagecache.inc
--- modules/asset_imagecache.inc	1 May 2008 08:22:07 -0000	1.1.2.3
+++ modules/asset_imagecache.inc	24 Jul 2008 21:52:41 -0000
@@ -1,18 +1,18 @@
 <?php
+// $Id$
 
 function imagecache_asset_settings(){
   $form[] = array('#value' => '<p>Select which imagecache presets should be available to use as asset formatters.</p>');
-  $presets = _imagecache_get_presets();
-  foreach($presets as $id=>$name){
-    $formats[$name] = array(
-      'name' => $name . ' (imagecache)',
+  $presets = imagecache_presets();
+  foreach($presets as $preset){
+    $formats[$preset['presetname']] = array(
+      'name' => $preset['presetname'] . ' (imagecache)',
       'types' => array('jpg','gif','png'),
-      'description' => _imagecache_asset_description($id),
     );
-    $form['asset_imagecache_preset_'.$id] = array(
+    $form['asset_imagecache_preset_'.$preset['presetid']] = array(
       '#type' => 'checkbox',
-      '#title' => $name,
-      '#default_value' => variable_get('asset_imagecache_preset_'.$id, 1),
+      '#title' => $preset['presetname'],
+      '#default_value' => variable_get('asset_imagecache_preset_'.$preset['presetid'], 1),
     );      
   }
   return system_settings_form($form);
@@ -21,13 +21,12 @@ function imagecache_asset_settings(){
 function imagecache_asset_formatter($op='info',$asset=null,$attr=array()){
   switch($op){
     case 'info':
-      $presets = _imagecache_get_presets();
-      foreach($presets as $id=>$name){
-        if(variable_get('asset_imagecache_preset_'.$id, 1)){
-          $formats[$name] = array(
-            'name' => $name . ' (imagecache)',
+      $presets = imagecache_presets();
+      foreach($presets as $preset){
+        if(variable_get('asset_imagecache_preset_'.$preset['presetid'], 1)){
+          $formats[$preset['presetname']] = array(
+            'name' => $preset['presetname'] . ' (imagecache)',
             'types' => array('local' => array('jpg','gif','png')),
-            'description' => _imagecache_asset_description($id),
           );
         }
       }
@@ -63,37 +62,9 @@ function imagecache_asset_formatter($op=
   }
 }
 
-function _imagecache_asset_description($preset_id){
-  $items = array();
-  $actions = _imagecache_actions_get_by_presetid($preset_id);
-  foreach($actions as $action){
-    switch($action['data']['function']){
-      case 'scale':
-        $items[] = 'Proportionally scaled to '
-                 . $action['data']['fit'] . ' dimensions of '
-                 . $action['data']['width'] . 'x' . $action['data']['height'] 
-                 . '.';
-        break;
-      case 'resize':
-        $items[] = 'Non-Proportionally scaled to '
-                 . $action['data']['width'] . 'x' . $action['data']['height'] 
-                 . '.';
-        break;
-      case 'crop':
-        $items[] = 'Cropped to '
-                 . $action['data']['width'] . 'x' . $action['data']['height'] 
-                 . ' at offset '
-                 . $action['data']['xoffset'] . ',' . $action['data']['yoffset'] 
-                 . '.';
-        break;
-    }
-  }
-  return join($items, '  Then, ');
-}
-
 function _asset_imagecache_get_size($name,$path){
-  $preset = _imagecache_preset_load_by_name($name);
-  $actions = _imagecache_actions_get_by_presetid($preset);
+  $preset = imagecache_preset_by_name($name);
+  $actions = imagecache_preset_actions($preset);
   $action = array_pop($actions);
   $rule = $action['data'];
   
