 
 ; ImageProcessor-related utilities
 
+(defn clone
+  "Duplicates and ImageProcessor."
+  [processor]
+  (when processor
+    (.duplicate processor)))
+
 (defn insert-image!
   "Inserts one ImageProcessor into another."
   [proc-host proc-guest x-host y-host]

(defn multiply
  "Multiply an image processor by a factor."
  [processor factor]
  (doto (.duplicate processor)
    (.multiply factor)))

(def add-processors


(defn insert-half-tile
  [tile [left? upper?] mosaic]
  (let [dest (or (clone mosaic) (black-processor-like tile))]
    (insert-half-tile! dest tile [left? upper?])))

;; stats
