obskyr / colorgram.py

A Python module for extracting colors from images. Get a palette of any picture!
MIT License
451 stars 50 forks source link

OverflowError: Python int too large to convert to C long #16

Open windu80 opened 2 years ago

windu80 commented 2 years ago

Hi,

I wanted to get a palette from an assortiment of images instead of one image, so I concatenated vertically about 36 images. The image is available here, so you can test. When I run the list_colors = colorgram.extract(full_img, number_of_colors=6) on this image, I get the following error:

File "C:\Users\Owner\Dropbox\Online classes\Udemy - Python 100 Days of Code\Python Projects\venv\lib\site-packages\colorgram\colorgram.py", line 42, in extract samples = sample(image) File "C:\Users\Owner\Dropbox\Online classes\Udemy - Python 100 Days of Code\Python Projects\venv\lib\site-packages\colorgram\colorgram.py", line 91, in sample samples[packed] += r OverflowError: Python int too large to convert to C long

Not sure how to solve this issue...