       {"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)
+  {:pix (:pix img)
    :tags
    (merge
      (generate-metadata event state)

     )}) ;; include any existing metadata

(defn make-TaggedImage [annotated-img]
  (TaggedImage. (:direct-buffer annotated-img)
                (:bytes-per-pixel annotated-img)
                (JSONObject. (:tags annotated-img))))

;; hardware error handling


(defn pop-burst-image
  [timeout-ms]
  (let [tagged-image (pop-tagged-image-timeout timeout-ms)]
    {:pix (.pix tagged-image)
     :tags (json-to-data (.tags tagged-image))}))

(defn pop-burst-images
  [n timeout-ms]
