Index: sites/all/modules/contrib/imagecache_actions/coloractions/imagecache_coloractions.module
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- sites/all/modules/contrib/imagecache_actions/coloractions/imagecache_coloractions.module	(revision eed3087ce72bbe9f535a64ebdaa1b3e9bb7e67ce)
+++ sites/all/modules/contrib/imagecache_actions/coloractions/imagecache_coloractions.module	(revision )
@@ -80,6 +80,13 @@
     'summary theme' => 'coloractions_convert_summary',
   );
 
+  $effects['coloractions_interlace'] = array(
+    'label' => t('Interlace / Progressive'),
+    'help' => t('Create interlaced PNG/GIF or progressive JPG. ImageMagick only.'),
+    'effect callback' => 'coloractions_interlace_image',
+    'dimensions passthrough' => TRUE,
+  );
+
   $effects['imagecache_alpha'] = array(
     'label' => t('Alpha Transparency'),
     'help' => t('Adjust transparency.'),
@@ -509,6 +516,37 @@
   return array('image/jpeg' => 'jpg', 'image/gif' => 'gif', 'image/png' => 'png');
 }
 
+/**
+ * Implementation of hook_image()
+ *
+ * Process the imagecache action on the passed image
+ */
+function coloractions_interlace_image($image, $data = array()) {
+  image_toolkit_invoke('interlace_image', $image, array($data));
+  return TRUE;
+}
+
+/**
+ * Implementation of hook_{toolkit}_{effect}()
+ *
+ * image_toolkit_invoke will exit with an error when no implementation is
+ * provided for the active toolkit so provide an empty operation for the GD
+ * tookit
+ */
+function image_gd_interlace_image($image, $data) {
+  imageinterlace($image->resource, 1);
+  return TRUE;
+}
+
+/**
+ * Implements hook_{toolkit}_{effect}().
+ *
+ * Interlacing with imagemagick is done by adding an argument.
+ */
+function image_imagemagick_interlace_image($image, $data) {
+  $image->ops[] = '-interlace Plane';
+  return TRUE;
+}
 /**
  * Implementation of theme_hook() for imagecache_ui.module
  */
