 (defn pop-burst-image
   [timeout-ms]
   (let [tagged-image (pop-tagged-image-timeout timeout-ms)]
-    {:direct-buffer (.getDirectBuffer tagged-image)
-     :bytes-per-pixel (.getBytesPerPixel tagged-image)
-     :tags (json-to-data (.getTags tagged-image))}))
+    {:pix (.pix tagged-image)
+     :tags (json-to-data (.tags tagged-image))}))
 
 (defn pop-burst-images
   [n timeout-ms]

      {"AttachedTasks" (JSONArray. (map str runnables))})))

(defn annotate-image [img event state elapsed-time-ms]
  {:direct-buffer (:direct-buffer img)
   :bytes-per-pixel (:bytes-per-pixel img)
   :tags
   (merge
     (generate-metadata event state)

     )}) ;; include any existing metadata

(defn make-TaggedImage [annotated-img]
  (TaggedImage. (:pix annotated-img) (JSONObject. (:tags annotated-img))))

;; hardware error handling

