Comments (6)
Compress your GIF using gifsicle
$ gifsicle --colors=255 /path/to/source.gif /path/to/output.gif
It works for me.
from giftolottie.
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.
did you install the dependencies?
pip3 install -r requirements.txt
from giftolottie.
yes
from giftolottie.
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.
It seems to be specific for the first GIF I tried, others are working!
from giftolottie.
Related Issues (20)
- Exception: unexpected fixed contents: got b'', was waiting for b'GIF' HOT 2
- FileNotFoundError: [Errno 2] No such file or directory: '/tmp/smile0.svg' HOT 1
- FileNotFoundError: [Errno 2] No such file or directory: 'gifsicle' HOT 7
- FileNotFoundError: [WinError 2] HOT 2
- IndexError: list index out of range on Ubuntu 16.04 Python 3.7 HOT 1
- Enable multiprocessing HOT 1
- Not working HOT 3
- Qs HOT 1
- TypeError: 'ColorTable' object is not subscriptable HOT 4
- run(["gifsicle", "-U", sys.argv[1]], stdout=tmpfile) HOT 2
- not work HOT 1
- Нихуя не понял как этим пользоваться HOT 1
- Telegram жалуется на формат файла
- new idea HOT 6
- error while converting to .gif HOT 7
- Telegram bot HOT 4
- No such file or directory: 'gifsicle': 'gifsicle' HOT 2
- ModuleNotFoundError: No module named 'pkg_resources' HOT 2
- File "read.py", line 15, in <module> HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from giftolottie.