std.image.base.display

animate

added in 3.0

(animate images {:keys [channel pause loop], :or {loop 1}, :as opts})

allows for animation of images to occur

byte-gray->rows

added in 3.0

(byte-gray->rows array size)

creates rows from byte-gray array

(-> (byte-array 10 20 30 40) (byte-gray->rows 2 2) vec) => [10 20 30 40]

CLEARLINE

display

added in 3.0

(display image)(display image {:keys [channel], :as opts})

outputs an ascii string based on image input

(with-out-str (display {:data (byte-array 10 20 30 40 50) :size 5 1 :model (model/model :byte-gray)})) ;;“Ã#HXÕß¶$\n”

int-argb->rows

added in 3.0

(int-argb->rows array size)

creates rows from int-argb array

(-> (map util/bytes->int [255 10 20 30 255 40 50 60]) (int-array) (int-argb->rows 1 2)) => [20 50]

render

added in 3.0

(render image)(render image {:keys [channel], :as opts})

renders an image for output

render-byte-gray

added in 3.0

(render-byte-gray image)(render-byte-gray {:keys [data size], :as image} opts)

creates an ascii string for the byte-gray array

(render-byte-gray {:data (byte-array 10 20 30 40) :size 2 2}) ;;“Ã#\nŠp” => string?

render-int-argb

added in 3.0

(render-int-argb image)(render-int-argb {:keys [data size], :as image} opts)

creates an ascii string for the int-argb array

(render-int-argb {:data (->> [255 10 20 30 255 40 50 60] (map util/bytes->int) (int-array)) :size 2 1}) ;; “Äp” => string?

render-string

added in 3.0

(render-string rows)(render-string rows table len)

render string based on rows containing values

(render-string [10 20 30 40 10 20 30 40]) ;;“ÂNHœŠm\nWNÀXŠm” => string?

UP