To easily transfer Telegram stickers to WhatsApp you can use Telegram Bot
👉 https://t.me/tgtowabot 👈
There are 2 options:
- Run using Docker. One-line command, the option requires only Docker installed
- Download and run compiled executable files. The option requires run-time dependecies installed
Replace with directory with Lottie animations / Telegram stickers and run:
- Convert to GIF:
docker run --rm -v <path to directory>:/source edasriyan/lottie-to-gif
- Convert to PNG:
docker run --rm -v <path to directory>:/source edasriyan/lottie-to-png
- Convert to APNG:
docker run --rm -v <path to directory>:/source edasriyan/lottie-to-apng
- Convert to WEBP:
docker run --rm -v <path to directory>:/source edasriyan/lottie-to-webp
You can provide parameters via env variables:
HEIGHT
: Output image height. Default: 512WIDTH
: Output image width. Default: 512FPS
: Output frame rate. Default: apng,png,webp - 60; gif - 50QUALITY
: Output quality. Default: 90THREADS
: Number of threads to use. Default: number of CPUs
Example:
docker run --rm -e HEIGHT=256 -e WIDTH=256 -e FPS=30 -v /home/ed/Downloads/lottie-animations:/source edasriyan/lottie-to-apng
Results will be saved next to each source file in the same directory.
-
Install run-time dependencies. Make sure the path to them present in
PATH
variable: -
Download executable from releases section of this repo for your OS and arch
-
In downloaded archive find the following executable scripts:
lottie_to_apng.sh
lottie_to_gif.sh
lottie_to_png.sh
lottie_to_webp.sh
All of them have the same CLI:
$ ./bin/lottie_to_gif.sh -h usage: ./bin/lottie_to_gif.sh [--help] [--output OUTPUT] [--height HEIGHT] [--width WIDTH] [--threads THREADS] [--fps FPS] [--quality QUALITY] path Lottie animations (.json) and Telegram stickers for Telegram (*.tgs) to animated .gif converter Positional arguments: path Path to .json or .tgs file to convert Optional arguments: -h, --help show this help message and exit --output OUTPUT Output file path --height HEIGHT Output image height. Default: --width WIDTH Output image width. Default: 512 --fps FPS Output frame rate. Default: 50 --threads THREADS Number of threads to use. Default: number of CPUs --quality QUALITY Output quality. Default: 90
-
Install dependencies
-
Invoke conan preset
- Linux & MacOS
cmake --preset conan-release
- Windows
cmake --preset conan-default
- Linux & MacOS
-
Build
cmake -DCMAKE_BUILD_TYPE=Release CMakeLists.txt && cmake --build . --config Release
M1 troubleshooting
Run the following command and try again:echo '#if defined(__ARM_NEON__) #include "vdrawhelper.h" void memfill32(uint32_t *dest, uint32_t value, int length) { memset(dest, value, length); } static void color_SourceOver(uint32_t *dest, int length, uint32_t color, uint32_t alpha) { int ialpha, i; if (alpha != 255) color = BYTE_MUL(color, alpha); ialpha = 255 - vAlpha(color); for (i = 0; i < length; ++i) dest[i] = color + BYTE_MUL(dest[i], ialpha); } void RenderFuncTable::neon() { updateColor(BlendMode::Src , color_SourceOver); } #endif ' > _deps/rlottie-src/src/vector/vdrawhelper_neon.cpp
-
Convert!
- To convert to GIF:
./bin/lottie_to_gif.sh /home/ed/Downloads/animation.json
- To convert to PNG:
./bin/lottie_to_png.sh /home/ed/Downloads/animation.json
- To convert to APNG:
./bin/lottie_to_apng.sh /home/ed/Downloads/animation.json
- To convert to WEBP:
./bin/lottie_to_webp.sh /home/ed/Downloads/animation.json
Results will be saved next to each source file in the same directory.
- To convert to GIF:
- What is lottie? - https://airbnb.design/lottie/
- You can download Telegram sticker files (.tgs) using @Stickerdownloadbot.