   (import com.mortennobel.imagescaling.ResampleOp))
 
 (defn load-image [^String f]
-  "Load an image f into a BufferedImage"
+  "Load filename f into a BufferedImage"
   (ImageIO/read
    (File. f)))
 
 (defn save-image [^BufferedImage b ^String f]
-  "Save a BufferedImage to filename f."
+  "Save image b to filename f."
   (ImageIO/write b "jpg" (File. f)))
 
 (defn rescale [x y ^BufferedImage b]
-  "Rescale an image b to dimensions x y."
+  "Rescale image b to dimensions x y."
   (. (ResampleOp. x y) (filter b nil)))
 
 (defn rescale-fixed-ratio [x ^BufferedImage b]
-  "Resize an image to width x, keeping the aspect ratio."
+  "Resize image b to width x, keeping the aspect ratio."
   (let [h (.getHeight b)
 	r (/ x (.getWidth b))
 	y (int (* h r))]

(defn insert! [^BufferedImage a
	       ^BufferedImage b
	       dx dy]
  "Insert image a into image b at coordinates dx,dy."
  (let [da (.getRaster a)
	db (.getRaster b)]
    (reduce = nil

  (.getSubimage b x y dx dy))

(defn get-samples [^BufferedImage b]
  "Get a flat list of all samples in image b."
  (let [d (.getData b)]
    (for [x (range (.getWidth d))
	  y (range (.getHeight d))
