From a873a191b9d25236774cec82df2ceb6399ed4ce3 Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Wed, 5 Jul 2023 18:19:56 +0200 Subject: [PATCH] Define colorspaces for imagemagick comparison ImageMagick 7.1.1-12 changed the default colorspaces used by the PHASH compare function from sRGB,HCLp to xyY,HSB. This breaks the current code for comparisons, so let's define the colorspaces ourselves. Signed-off-by: Sefa Eyeoglu --- beets/util/artresizer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beets/util/artresizer.py b/beets/util/artresizer.py index 225280a94..0082b1220 100644 --- a/beets/util/artresizer.py +++ b/beets/util/artresizer.py @@ -256,7 +256,7 @@ class IMBackend(LocalBackend): '-colorspace', 'gray', 'MIFF:-' ] compare_cmd = self.compare_cmd + [ - '-metric', 'PHASH', '-', 'null:', + '-define', 'phash:colorspaces=sRGB,HCLp', '-metric', 'PHASH', '-', 'null:', ] log.debug('comparing images with pipeline {} | {}', convert_cmd, compare_cmd)