 (defonce setup-stuff
  (do
   (let [button (dom/getElement "go")]
-   (when button (events/listen button "click" go-click-listener)))
+   (events/listen button "click" go-click-listener))
   (events/listen (dom/getElement "inverse") "click"
     (fn [event]
      (swap! img invert-image)

      )))

(defn display-image-array [pixels]
  (let [pixels-div (dom/getElement "pixels")]
    (when pixels-div
      (let [s (pixels-to-string pixels [])]
        (set! (.-innerHTML pixels-div) s))
      )
    ))

(defonce max-image-dimension 224)



(defn on-dom-loaded []
  (let [file-upload (dom/getElement "fileInput")]
    (events/listen file-upload "change" handle-files)))

(def w (dom/getWindow))
(events/listen w (.-DOMCONTENTLOADED events/EventType) on-dom-loaded)
