dylanaraps / pywal

🎨 Generate and change color-schemes on the fly.
MIT License
8.34k stars 325 forks source link

FIXED* had to put the image into gimp and export it as png #655

Closed felhsznalonev closed 2 years ago

felhsznalonev commented 2 years ago

Could this be a problem with imagemagick? I am facing this issue:

convert: improper image header `/home/susam/wallpapers/bluewater.png' @ error/png.c/ReadPNGImage/4296.
convert: no images defined `txt:-' @ error/convert.c/ConvertImageCommand/3322.
Traceback (most recent call last):
  File "/home/susam/.local/bin/wal", line 33, in <module>
    sys.exit(load_entry_point('pywal==3.3.0', 'console_scripts', 'wal')())
  File "/home/susam/.local/lib/python3.9/site-packages/pywal/__main__.py", line 208, in main
    parse_args(parser)
  File "/home/susam/.local/lib/python3.9/site-packages/pywal/__main__.py", line 163, in parse_args
    colors_plain = colors.get(image_file, args.l, args.backend,
  File "/home/susam/.local/lib/python3.9/site-packages/pywal/colors.py", line 144, in get
    colors = getattr(backend, "get")(img, light)
  File "/home/susam/.local/lib/python3.9/site-packages/pywal/backends/wal.py", line 86, in get
    colors = gen_colors(img)
  File "/home/susam/.local/lib/python3.9/site-packages/pywal/backends/wal.py", line 41, in gen_colors
    raw_colors = imagemagick(16 + i, img, magick_command)
  File "/home/susam/.local/lib/python3.9/site-packages/pywal/backends/wal.py", line 19, in imagemagick
    return subprocess.check_output([*magick_command, img, *flags]).splitlines()
  File "/usr/lib/python3.9/subprocess.py", line 424, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['magick', 'convert', '/home/susam/wallpapers/bluewater.png[0]', '-resize', '25%', '-colors', '16', '-unique-colors', 'txt:-']' returned non-zero exit status 1.
felhsznalonev commented 2 years ago

had to put the image into gimp and export it as png