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
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.