Closed adrhill closed 2 years ago
Merging #87 (74cb365) into master (3a15890) will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## master #87 +/- ##
=======================================
Coverage 97.77% 97.77%
=======================================
Files 13 13
Lines 270 270
=======================================
Hits 264 264
Misses 6 6
Impacted Files | Coverage Δ | |
---|---|---|
src/api/color.jl | 90.00% <ø> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 3a15890...74cb365. Read the comment docs.
And rerunning the benchmark code from here on my machine:
# DitherPunk.jl
using DitherPunk, TestImages
img_gray = testimage("cameraman")
img_rgb = testimage("peppers_color")
# gray - binary
@btime dither($img_gray); # 2.262 ms (5 allocations: 1.25 MiB)
# gray - cmap
cmap = DitherPunk.get_colorscheme(img_gray, 8)
@btime dither($img_gray, $cmap); # 376.023 ms (5230704 allocations: 82.82 MiB)
# rgb - binary
@btime dither($img_rgb); # 9.477 ms (11 allocations: 3.75 MiB)
# rgb - cmap
cmap = DitherPunk.get_colorscheme(img_rgb, 8)
@btime dither($img_rgb, $cmap); # 269.264 ms (5230676 allocations: 148.68 MiB)
The previously used
DE_2000
from Colors.jl requires a lot more computations thanDE_AB
, which is a Euclidean metric in LAB colorspace.By changing two lines of code, I locally get a 4x speed-up:
Rerunning the benchmarks from #70, I now get: