Increase sample rate to get a more faithful set of colors
This commit is contained in:
@@ -49,7 +49,7 @@ defmodule MusicLibrary.Records.DominantColors do
|
|||||||
height = Image.height(image)
|
height = Image.height(image)
|
||||||
|
|
||||||
# Sample every nth pixel to get a good distribution
|
# Sample every nth pixel to get a good distribution
|
||||||
sample_step = max(1, div(min(width, height), 20))
|
sample_step = max(1, div(min(width, height), 10))
|
||||||
|
|
||||||
pixels =
|
pixels =
|
||||||
for y <- 0..(height - 1)//sample_step,
|
for y <- 0..(height - 1)//sample_step,
|
||||||
|
|||||||
Reference in New Issue
Block a user