mirror of
https://github.com/dylanaraps/pywal.git
synced 2024-11-29 11:24:03 +01:00
magic: Fixed infinite loop when wal is given a really simple image.
This commit is contained in:
parent
bf88cd7881
commit
e839fab860
@ -41,6 +41,11 @@ def gen_colors(img):
|
|||||||
"color palette, trying a larger palette size",
|
"color palette, trying a larger palette size",
|
||||||
COLOR_COUNT + index)
|
COLOR_COUNT + index)
|
||||||
|
|
||||||
|
if index > 20:
|
||||||
|
print("colors: Imagemagick couldn't generate a suitable scheme",
|
||||||
|
"for the image. Exiting...")
|
||||||
|
quit(1)
|
||||||
|
|
||||||
# Remove the first element, which isn't a color.
|
# Remove the first element, which isn't a color.
|
||||||
del raw_colors[0]
|
del raw_colors[0]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user