diff --git a/stroke/imagecache_stroke.info b/stroke/imagecache_stroke.info
new file mode 100644
index 0000000..ba7ea7c
--- /dev/null
+++ b/stroke/imagecache_stroke.info
@@ -0,0 +1,8 @@
+name = Imagecache Stroke
+description = Add border around image.
+dependencies[] = image
+package = Image
+core = 7.x
+
+files[] = imagecache_stroke.install
+files[] = imagecache_stroke.module
diff --git a/stroke/imagecache_stroke.install b/stroke/imagecache_stroke.install
new file mode 100644
index 0000000..6eb1537
--- /dev/null
+++ b/stroke/imagecache_stroke.install
@@ -0,0 +1,27 @@
+<?php
+/**
+ * @file
+ * Ensure Imagecache recognises our new actions, per http://drupal.org/node/290101.
+ */
+
+/**
+ * @todo Please document this function.
+ * @see http://drupal.org/node/1354
+ */
+function imagecache_stroke_enable() {
+  if (function_exists('imagecache_action_definitions') ) {
+    imagecache_action_definitions(TRUE);
+  }
+  cache_clear_all('imagecache_actions', 'cache');
+}
+
+/**
+ * @todo Please document this function.
+ * @see http://drupal.org/node/1354
+ */
+function imagecache_stroke_disable() {
+  if (function_exists('imagecache_action_definitions') ) {
+    imagecache_action_definitions(TRUE);
+  }
+  cache_clear_all('imagecache_actions', 'cache');
+}
diff --git a/stroke/imagecache_stroke.module b/stroke/imagecache_stroke.module
new file mode 100644
index 0000000..29d4322
--- /dev/null
+++ b/stroke/imagecache_stroke.module
@@ -0,0 +1,109 @@
+<?php
+/**
+ * @file imagecache_stroke.module
+ * TODO: Enter file description here.
+ */
+
+/**
+ * Implements hook_image_effect_info().
+ */
+function imagecache_stroke_image_effect_info() {
+  $effects = array();
+
+  $effects['imagecache-stroke'] = array(
+    'label' => t('Stroke'),
+    'help' => t('Add a border around an image.'),
+    'effect callback' => 'imagecache_stroke_effect',
+    'form callback' => 'imagecache_stroke_form',
+  );
+
+  return $effects;
+}
+
+/**
+ * Build config form
+ */
+function imagecache_stroke_form($action) {
+  $form = array();
+  $form['size'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Size'),
+    '#description' => t('Size of stroke in px.'),
+    '#default_value'=> isset($action['size']) ? $action['size'] : '1',
+    '#field_suffix' => 'px',
+    '#required' => TRUE,
+    '#size' => 10,
+    '#element_validate' => array('image_effect_integer_validate'),
+    '#allow_negative' => FALSE,
+  );
+  $form['color'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Color'),
+    '#decription' => t('Color in hexformat. Do not include the # symbol.'),
+    '#default_value' => isset($action['color']) ? $action['color'] : '000000',
+    '#field_prefix' => '#',
+    '#required' => TRUE,
+    '#size' => 10,
+    '#element_validate' => array('imagecache_stroke_hex_validate'),
+  );
+  return $form;
+}
+
+/**
+ * Validate hex code
+ */
+function imagecache_stroke_hex_validate($element, &$form_state) {
+  if ($element['#value'] != '' && (!preg_match('/^[0-9a-fA-F]{6}$/', $element['#value']))) {
+    form_error($element, t('!name must be an hex value in the form #000000.', array('!name' => $element['#title'])));
+  }
+}
+
+/**
+ * Add stroke to image
+ */
+function imagecache_stroke_effect(&$image, $data) {
+  return image_toolkit_invoke('stroke', $image, array($data));
+}
+
+/**
+ * Implements hook_{toolkit}_{effect}()
+ */
+function image_gd_stroke($image, $data = array()) {
+  $x1 = 0; 
+  $y1 = 0; 
+  $x2 = ImageSX($image->resource) - 1; 
+  $y2 = ImageSY($image->resource) - 1; 
+  $get_color = hex2array($data['color']);
+  $color = imagecolorallocate($image->resource, $get_color[0], $get_color[1], $get_color[2]);
+  
+  for($i = 0; $i < intval($data['size']); $i++) { 
+    ImageRectangle($image->resource, $x1++, $y1++, $x2--, $y2--, $color);
+  }
+  
+  return TRUE;
+}
+
+/**
+ * Implements hook_{toolkit}_{effect}()
+ */
+function image_imagemagick_stroke($image, $data = array()) {
+  $image->ops[] = " -shave {$data['size']}x{$data['size']} -bordercolor '#{$data['color']}' -border {$data['size']}";
+  return TRUE;
+}
+
+/**
+ * Convert color from hex in XXXXXX (eg. FFFFFF, 000000, FF0000) to array(R, G, B)
+ * of integers (0-255).
+ *
+ * name: rgb2array
+ * author: Yetty
+ * @param $color hex in XXXXXX (eg. FFFFFF, 000000, FF0000)
+ * @return string; array(R, G, B) of integers (0-255)
+ */
+function hex2array($rgb) {
+    return array(
+        base_convert(substr($rgb, 0, 2), 16, 10),
+        base_convert(substr($rgb, 2, 2), 16, 10),
+        base_convert(substr($rgb, 4, 2), 16, 10),
+    );
+}
