--- customactions/imagecache_customactions.module.orig	2011-10-16 00:51:21.000000000 +1100
+++ customactions/imagecache_customactions.module	2011-11-28 12:44:17.000000000 +1100
@@ -185,8 +185,8 @@ function imagecache_subroutine_form($act
 
   // List available presets
   $presets = array();
-  foreach (imagecache_presets(TRUE) as $preset) {
-    $presets[$preset['presetname']] = $preset['presetname'];
+  foreach (image_styles(TRUE) as $preset) {
+    $presets[$preset['name']] = $preset['name'];
   }
 
   $form['subroutine_presetname'] = array(
@@ -210,9 +210,9 @@ function imagecache_subroutine_form($act
  * @param $action
  */
 function imagecache_subroutine_image($image, $data) {
-  if ($preset = imagecache_preset_by_name($data['subroutine_presetname'])) {
-    foreach ($preset['actions'] as $sub_action) {
-      _imagecache_apply_action($sub_action, $image);
+  if ($preset = image_style_load($data['subroutine_presetname'])) {
+    foreach ($preset['effects'] as $effect) {
+	    image_effect_apply($image, $effect);
     }
   }
   return TRUE;
