Skip to content

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

@windu80

Description

@windu80

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions