(create-model label)
creates a predefined image model given a label
(create-model :ushort-555-rgb) => {:type :color :label :ushort-555-rgb :channel {:count 1 :fn vector :inv first} :meta [{:type Short/TYPE :span 1}] :data {:red {:type Byte/TYPE :channel 0 :index 0 :access [10 5]} :green {:type Byte/TYPE :channel 0 :index 0 :access [5 5]} :blue {:type Byte/TYPE :channel 0 :index 0 :access [0 5]}}}
creates a predefined image model given a label (create-model :ushort-555-rgb) => {:type :color :label :ushort-555-rgb :channel {:count 1 :fn vector :inv first} :meta [{:type Short/TYPE :span 1}] :data {:red {:type Byte/TYPE :channel 0 :index 0 :access [10 5]} :green {:type Byte/TYPE :channel 0 :index 0 :access [5 5]} :blue {:type Byte/TYPE :channel 0 :index 0 :access [0 5]}}}
(model)
(model x)
(model x overwrites)
creates a model with overwrites
(model) => [:3-byte-bgr :3-byte-rgb :3ch-byte-rgb :4-byte-abgr :4-byte-argb :4ch-byte-argb :byte-binary :byte-gray :int-argb :int-bgr :int-rgb :standard-argb :standard-gray :ushort-555-rgb :ushort-565-rgb :ushort-gray]
(model :int-rgb {:type :stuff :data :none :channel {:hello :world}}) => (contains-in {:type :stuff, :data :none, :channel {:count 1, :hello :world}})
creates a model with overwrites (model) => [:3-byte-bgr :3-byte-rgb :3ch-byte-rgb :4-byte-abgr :4-byte-argb :4ch-byte-argb :byte-binary :byte-gray :int-argb :int-bgr :int-rgb :standard-argb :standard-gray :ushort-555-rgb :ushort-565-rgb :ushort-gray] (model :int-rgb {:type :stuff :data :none :channel {:hello :world}}) => (contains-in {:type :stuff, :data :none, :channel {:count 1, :hello :world}})
(model-inv-table {:keys [meta data type]})
creates a inverse access table for setting data within an image
;; channel 0, 0th index = (i1>>3)<<11 + (i2>>2)<<6 + i3>>3 (model-inv-table (model :ushort-565-rgb)) => {0 {0 {1 [11 5], 2 [5 6], 3 [0 5]}}}
creates a inverse access table for setting data within an image ;; channel 0, 0th index = (i1>>3)<<11 + (i2>>2)<<6 + i3>>3 (model-inv-table (model :ushort-565-rgb)) => {0 {0 {1 [11 5], 2 [5 6], 3 [0 5]}}}
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close