Index: imagecache.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/imagecache/imagecache.module,v
retrieving revision 1.19.2.32
diff -u -p -r1.19.2.32 imagecache.module
--- imagecache.module 17 Dec 2007 19:21:21 -0000  1.19.2.32
+++ imagecache.module 22 Jan 2008 21:37:55 -0000
@@ -772,3 +772,15 @@ function imagecache_image_flush($path) {
     file_delete($ipath);
   }
 }
+
+/**
+ * Check for an existing preset
+ * @param $preset_name
+ *    the name used to check against existing preset names
+ */
+function imagecache_preset_exists($preset_name) {
+  $query = "SELECT true FROM {imagecache_preset} WHERE presetname = '%s'";
+  $params = $preset_name;
+  $result = db_query($query, $params);
+  return db_result($result, 0);
+}
