Rust bindings to rlottie and some additional Rust code that interfaces with lottie files.
This repository contains the following crates:
Deprecated crates:
Rust bindings to rlottie and file conversion library and tools
License: MIT License
Rust bindings to rlottie and some additional Rust code that interfaces with lottie files.
This repository contains the following crates:
Deprecated crates:
Thanks for creating this great project. Is there a plan to replace gif crates with gifski in this project? As far as I know, gifski generates better quality GIF files.
Then I don't know if there is a performance difference between the two.
I should test the Argb
struct and Rgba
struct on platform with different endianness from linux to verify it works. For now, we emit a warning from a build script if we detect big endianness.
Thanks for sharing your work!
It would be cool if you could include an example on how to use those bindings on the Rust ecosystem -- maybe on Yew or Egui?
An Egui example would be particularly cool, as it may be used to create UIs for Desktop, Web, Android, iOS...
lottie is a vector image format and it can be render to arbitary size surface losslessly. But Animation::render()
requires a Size
struct which can't be constructed. Only Animation::size()
can return a Size
struct.
What about add a constructor function to Size
struct?
When I run
cargo install lottieconv --features="clap gif"
I'm getting this output/error (gist link because very long).
Support for converting to video will be very useful, as it is smaller than GIF files and can take advantage of GPU hardware acceleration when playing.
There is a SkottieTool in Skottie that generates mp4 files from FFmpeg, I don't know if this is something I could learn from.
If you plan to support video, I can port this library to Node.js via napi-rs.
The documentation of the lottieconv release is not available at https://docs.msrd0.de
Those also have repr(C)
so should work with no further adjustments necessary
Currently, rlottie-sys will always load libclang.so
at build time which is unsupported by rustup's static musl toolchain. To fix this, we need to detect a static-only toolchain and disable the runtime
feature of clang/bindgen.
However, this is not currently supported by cargo: rust-lang/cargo#1197
See also #17
Currently, this project relies on the rlottie C library to be precompiled and pkg-config
to be able to find it. This seems to be incompatible with windows.
I see two options going forward:
vendor
feature similar to other -sys
crates in the ecosystem that downloads and compiles a version of rlottie and statically links it.These options are not incompatible with each other, so both could be implemented if desired. As I don't have windows, I cannot implement this myself, but PRs are welcome. Any implementing PR needs to have a CI setup that tests everything on windows as I won't be able to test locally.
Telegram can recolor some animations to different skin colors
but it's telegram's rlottie only feature
TelegramMessenger/rlottie@67f103b
If I understand correctly I need to implement capi in optional file and add feature to use it
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.