pixelogik / ColorCube

Dominant color extraction for iOS, macOS and Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Type Error for certain image (Python)

mickeyl opened this issue · comments

For the image https://somafm.com/img3/defcon-400.png, I get the following TypeError when using ColorCube.py:

➜  Python git:(master) ✗ python3 ./ColorCube.py /tmp/defcon-400.png
Traceback (most recent call last):
  File "./ColorCube.py", line 305, in <module>
    colors = cc.get_colors(image)
  File "./ColorCube.py", line 126, in get_colors
    m = self.find_local_maxima(image)
  File "./ColorCube.py", line 152, in find_local_maxima
    r = float(p[0])/255.0
TypeError: 'int' object is not subscriptable
commented

Closing this because Image is gone. Sorry for the late reply.