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
I attempted to create a palette with a PNG w/ a RGBA paltette converted to a JPEG w/ a RGB palette for dithering using the hitherdither.palette.Palette.create_by_median_cut(img) method.
Traceback (most recent call last):
File "C:/Users/megag/PycharmProjects/SerenityBot/main_PIL_test.py", line 227, in <module>
dither_test()
File "C:/Users/megag/PycharmProjects/SerenityBot/main_PIL_test.py", line 27, in dither_test
palette = hitherdither.palette.Palette.create_by_median_cut(img)
File "C:\Users\megag\PycharmProjects\SerenityBot\venv\lib\site-packages\hitherdither\palette.py", line 185, in create_by_median_cut
new_bins += median_cut(bin, dim)
File "C:\Users\megag\PycharmProjects\SerenityBot\venv\lib\site-packages\hitherdither\palette.py", line 168, in median_cut
mins = p.min(axis=0)
File "C:\Users\megag\PycharmProjects\SerenityBot\venv\lib\site-packages\numpy\core\_methods.py", line 44, in _amin
return umr_minimum(a, axis, None, out, keepdims, initial, where)
ValueError: zero-size array to reduction operation minimum which has no identity
The text was updated successfully, but these errors were encountered:
caas1729
changed the title
Creating palette throws ValueError: zero-size array to reduction operation minimum which has no identity
Creating palette on certain images throws ValueError: zero-size array to reduction operation minimum which has no identity
Oct 24, 2021
Description
I attempted to create a palette with a PNG w/ a RGBA paltette converted to a JPEG w/ a RGB palette for dithering using the
hitherdither.palette.Palette.create_by_median_cut(img)
method.However, this error resulted:
A link to the image is available here: phcpd.png.
The text was updated successfully, but these errors were encountered: