Skip to content

Commit d8df754

Browse files
committed
The zs ;-;
1 parent 31ed5e9 commit d8df754

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/octree.jl

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11

22
struct 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
107
end
118

129
function (alg::OctreeQuantization)(img::AbstractArray)
13-
return octreequantisation!(img; numcolors=alg.numcolors)
10+
return octreequantization!(img; numcolors=alg.numcolors)
1411
end
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
10198
end
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
107104
end
108105

0 commit comments

Comments
 (0)