diff org/sense.org @ 460:763d13f77e03

merge in laptop changes.
author Robert McIntyre <rlm@mit.edu>
date Thu, 27 Mar 2014 17:57:01 -0400
parents 02cc0734a976
children 258078f78b33
line wrap: on
line diff
     1.1 --- a/org/sense.org	Thu Mar 27 17:56:26 2014 -0400
     1.2 +++ b/org/sense.org	Thu Mar 27 17:57:01 2014 -0400
     1.3 @@ -257,7 +257,7 @@
     1.4     Returns a function that accepts a BufferedImage and draws it to the
     1.5     JPanel. If given a directory it will save the images as png files
     1.6     starting at 0000000.png and incrementing from there."
     1.7 -  ([#^File save]
     1.8 +  ([#^File save title]
     1.9       (let [idx (atom -1)
    1.10             image
    1.11             (atom
    1.12 @@ -268,7 +268,7 @@
    1.13                 [graphics]
    1.14                 (proxy-super paintComponent graphics)
    1.15                 (.drawImage graphics @image 0 0 nil)))
    1.16 -           frame (JFrame. "Display Image")]
    1.17 +           frame (JFrame. title)]
    1.18         (SwingUtilities/invokeLater
    1.19          (fn []
    1.20            (doto frame
    1.21 @@ -285,6 +285,8 @@
    1.22             (ImageIO/write
    1.23              i "png"
    1.24              (File. save (format "%07d.png" (swap! idx inc))))))))
    1.25 +  ([#^File save]
    1.26 +     (view-image save "Display Image"))
    1.27    ([] (view-image nil)))
    1.28  
    1.29  (defn view-sense