From 8a2fda5f73d2e297d4d89bd89e15f3bddf7a2c0a Mon Sep 17 00:00:00 2001 From: Claudio Ortolina Date: Sat, 7 Jun 2025 19:43:54 +0100 Subject: [PATCH] Increase sample rate to get a more faithful set of colors --- lib/music_library/records/dominant_colors.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/music_library/records/dominant_colors.ex b/lib/music_library/records/dominant_colors.ex index ea17f8ed..e1562131 100644 --- a/lib/music_library/records/dominant_colors.ex +++ b/lib/music_library/records/dominant_colors.ex @@ -49,7 +49,7 @@ defmodule MusicLibrary.Records.DominantColors do height = Image.height(image) # 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 = for y <- 0..(height - 1)//sample_step,