(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]]
creates rows from byte-gray array (-> (byte-array [10 20 30 40]) (byte-gray->rows [2 2]) vec) => [[10 20] [30 40]]
(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"
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 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]]
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-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?
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 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?
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 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?
render string based on rows containing values (render-string [[10 20 30 40] [10 20 30 40]]) ;;"ÂNHœŠm\nWNÀXŠm" => string?
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close