File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change 11
22struct OctreeQuantization <: AbstractColorQuantizer
33 numcolors:: Int
4- function OctreeQuantization (
5- numcolors:: Int = 256 ;
6- kwargs...
7- )
4+ function OctreeQuantization (numcolors:: Int = 256 ; kwargs... )
85 return new (numcolors)
96 end
107end
118
129function (alg:: OctreeQuantization )(img:: AbstractArray )
13- return octreequantisation ! (img; numcolors= alg. numcolors)
10+ return octreequantization ! (img; numcolors= alg. numcolors)
1411end
1512
16- function octreequantisation ! (img; numcolors = 256 , precheck:: Bool = false )
13+ function octreequantization ! (img; numcolors = 256 , precheck:: Bool = false )
1714 # ensure the img is in RGB colorspace
1815 if (eltype (img) != RGB{N0f8})
1916 error (" Octree Algorithm requires img to be in RGB colorspace" )
@@ -100,9 +97,9 @@ function octreequantisation!(img; numcolors = 256, precheck::Bool = false)
10097 return colors
10198end
10299
103- function octreequantisation (img; kwargs... )
100+ function octreequantization (img; kwargs... )
104101 img_copy = deepcopy (img)
105- palette = octreequantisation ! (img_copy; kwargs... )
102+ palette = octreequantization ! (img_copy; kwargs... )
106103 return img_copy, palette
107104end
108105
You can’t perform that action at this time.
0 commit comments