You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The stated error occurs when opening any grayscale image. Unlike what you might suspect, the image does not have to have an alpha channel to cause this error; flattening it in GIMP makes no difference.
The log below is specifically the full error that occurs when attempting to open such a file on the commandline, ie avvie failing-image.png
It is not clear to me why the second and third tracebacks both occur (they are identical to one another)
Traceback (most recent call last):
File "/usr/share/avvie/avvie/main.py", line 151, in do_snapshot
picture.load(self.avvie.to_load, (w, h))
File "/usr/share/avvie/avvie/main.py", line 617, in load
self.reload(keep_rect=self.rec_w > 0)
File "/usr/share/avvie/avvie/main.py", line 554, in reload
by = im.tobytes("raw", "RGBA")
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/PIL/Image.py", line 760, in tobytes
e = _getencoder(self.mode, encoder_name, args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/PIL/Image.py", line 437, in _getencoder
return encoder(mode, *args + extra)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: No packer found from LA to RGBA
Traceback (most recent call last):
File "/usr/share/avvie/avvie/main.py", line 1667, in toggle_menu_setting2
picture.gen_thumbnails(hq=True)
File "/usr/share/avvie/avvie/main.py", line 508, in gen_thumbnails
by = cr.tobytes("raw", "RGBA")
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/PIL/Image.py", line 760, in tobytes
e = _getencoder(self.mode, encoder_name, args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/PIL/Image.py", line 437, in _getencoder
return encoder(mode, *args + extra)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: No packer found from LA to RGBA
Traceback (most recent call last):
File "/usr/share/avvie/avvie/main.py", line 1667, in toggle_menu_setting2
picture.gen_thumbnails(hq=True)
File "/usr/share/avvie/avvie/main.py", line 508, in gen_thumbnails
by = cr.tobytes("raw", "RGBA")
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/PIL/Image.py", line 760, in tobytes
e = _getencoder(self.mode, encoder_name, args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/PIL/Image.py", line 437, in _getencoder
return encoder(mode, *args + extra)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: No packer found from LA to RGBA
The overall result is that any grayscale image simply cannot be cropped in Avvie without first converting it to RGB(A).
Avvie v 2.2 (installed via AUR package 'avvie')
Python 3.11
Pillow 9.5.0
Example failing image: Attached.
The text was updated successfully, but these errors were encountered:
Ideally you'd record the input pixel format and save with that, but yeah, optipng will figure out that the file can be reduced to greyscale, so it's no big deal, mostly.
(not sure whether, for WEBP, there is any utility that will do the same kind of detection->optimization.)
The stated error occurs when opening any grayscale image. Unlike what you might suspect, the image does not have to have an alpha channel to cause this error; flattening it in GIMP makes no difference.
The log below is specifically the full error that occurs when attempting to open such a file on the commandline, ie
avvie failing-image.png
It is not clear to me why the second and third tracebacks both occur (they are identical to one another)
The overall result is that any grayscale image simply cannot be cropped in Avvie without first converting it to RGB(A).
Avvie v 2.2 (installed via AUR package 'avvie')

Python 3.11
Pillow 9.5.0
Example failing image: Attached.
The text was updated successfully, but these errors were encountered: