Giter VIP home page Giter VIP logo

pixelart2tgs's Introduction

pixelart2tgs

Simple .gif to .tgs converter cli utility.

Source GIF Tg demonstation

Warning

After update of Telegram with the addition of video stickers, this project lost all practical meaning. If you need to make animated stickers from GIFs after January 2022, use tgradish.

Some not so user friendly alternatives

Installation

python -m pip install pixelart2tgs

and then usage:

python -m pixelart2tgs

Usage examples

$ pixelart2tgs -i input.gif
input.gif -> input.tgs
$ pixelart2tgs -i first.gif -i second.gif sticker.tgs -y
first.gif -> first.tgs
second.gif -> "sticker.tgs

License

MIT License

pixelart2tgs's People

Contributors

sliva0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

pixelart2tgs's Issues

一直卡住

^CTraceback (most recent call last):
File "/opt/homebrew/Cellar/[email protected]/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/opt/homebrew/Cellar/[email protected]/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/opt/homebrew/lib/python3.10/site-packages/pixelart2tgs/main.py", line 194, in
main()
File "/opt/homebrew/lib/python3.10/site-packages/pixelart2tgs/main.py", line 185, in main
lottie = generate_lottie(source, args.label) # type: ignore
File "/opt/homebrew/lib/python3.10/site-packages/pixelart2tgs/lottie_generator.py", line 32, in generate_lottie
durations, shape_dict = generate_shapes(source)
File "/opt/homebrew/lib/python3.10/site-packages/pixelart2tgs/shape_generator.py", line 95, in generate_shapes
frames_shapes = list(map(extract_frame_shapes, frames))
File "/opt/homebrew/lib/python3.10/site-packages/pixelart2tgs/shape_generator.py", line 77, in extract_frame_shapes
shape, shape_shift = normalize_shape(labels == label_number)
File "/opt/homebrew/lib/python3.10/site-packages/pixelart2tgs/shape_generator.py", line 54, in normalize_shape
coords = shape.nonzero() # get transposed coords of ones in shape
KeyboardInterrupt

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.