GithubHelp home page GithubHelp logo

ColorTable error about giftolottie HOT 6 OPEN

bodqhrohro avatar bodqhrohro commented on May 30, 2024 1
ColorTable error

from giftolottie.

Comments (6)

PHKenny avatar PHKenny commented on May 30, 2024 1

Compress your GIF using gifsicle

$ gifsicle --colors=255 /path/to/source.gif /path/to/output.gif

It works for me.

from giftolottie.

bodqhrohro avatar bodqhrohro commented on May 30, 2024 1

Wow, I didn't even realize for years that there is some activity in the issue tracker, as GitHub did not send e-mail notifications about new issues. Pretty sorry about it. Glad to see that the community mostly managed to organize without my attention.

@PedroHLC the GIF you tried is pretty large, the project provides sane results only for tiny ones, which is described in README. And as Telegram now supports WebM stickers natively, I suppose it's outdated now, unless someone needs Lottie animations for some other software.

from giftolottie.

Jiyuu avatar Jiyuu commented on May 30, 2024

did you install the dependencies?
pip3 install -r requirements.txt

from giftolottie.

suiqa avatar suiqa commented on May 30, 2024

yes

from giftolottie.

PedroHLC avatar PedroHLC commented on May 30, 2024

LOL, this is the first issue and it's still relevant.

╭─pedrohlc at pc in /tmp/giftolottie (master ✔)
╰─λ pip install --user -r requirements.txt
Requirement already satisfied: kaitaistruct in /home/pedrohlc/.local/lib/python3.8/site-packages (from -r requirements.txt (line 1)) (0.9)
Requirement already satisfied: svgwrite in /home/pedrohlc/.local/lib/python3.8/site-packages (from -r requirements.txt (line 2)) (1.4)
Requirement already satisfied: numpy in /home/pedrohlc/.local/lib/python3.8/site-packages (from -r requirements.txt (line 3)) (1.19.4)

╭─pedrohlc at pc in /tmp/giftolottie (master ✔)
╰─λ python read.py /tmp/tenor.gif uselessgoddess.tgs
gifsicle:/tmp/tenor.gif: warning: GIF too complex to unoptimize
  (The reason was local color tables or complex transparency.
  Try running the GIF through ‘gifsicle --colors=255’ first.)
gifsicle: warning: too many colors, using local colormaps
  (You may want to try ‘--colors 256’.)
Traceback (most recent call last):
  File "read.py", line 22, in <module>
    frames, exts, image_specs = vendor.gif2numpy.convert(tmpfile.name, BGR2RGB=False)
  File "/tmp/giftolottie/vendor/gif2numpy.py", line 629, in convert
    np_image = np.array([local_color_table[byt] if byt != exts[-1]['transparent_idx'] else (254, 0, 254) for byt in uncompressed])
  File "/tmp/giftolottie/vendor/gif2numpy.py", line 629, in <listcomp>
    np_image = np.array([local_color_table[byt] if byt != exts[-1]['transparent_idx'] else (254, 0, 254) for byt in uncompressed])
TypeError: 'ColorTable' object is not subscriptable

╭─pedrohlc at pc in /tmp/giftolottie (master ✔)
╰─λ python --version
Python 3.8.6

from giftolottie.

PedroHLC avatar PedroHLC commented on May 30, 2024

It seems to be specific for the first GIF I tried, others are working!

from giftolottie.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.