A tool to inline images in Lottie JSON files
Project description
Lottie Inline Tool
A simple tool to inline images in Lottie JSON files.
Installation
$ pip install lottie-inline
Usage
Basic usage:
$ lottie-inline /path/to/input-lottie-file.json /path/to/output-lottie-file.json
Limit the size of the images to be inlined to 100KB:
$ lottie-inline /path/to/input-lottie-file.json /path/to/output-lottie-file.json --max-size=100
Details
The tool will inline all images in the Lottie JSON file and save the result to the output file.
transform:
{
"assets": [
{
"id": "image_0",
"w": 500,
"h": 500,
"u": "images/",
"p": "image.png",
"e": 0
},
],
}
to:
{
"assets": [
{
"id": "image_0",
"w": 500,
"h": 500,
"u": "",
"p": "data:image/png;base64,...",
"e": 1
},
],
}
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lottie_inline-0.1.3.tar.gz
(2.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lottie_inline-0.1.3.tar.gz.
File metadata
- Download URL: lottie_inline-0.1.3.tar.gz
- Upload date:
- Size: 2.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9ef43a761471b2ea886ef1e481a29f8b5b072fe4339acadfe834fb7e5169b37
|
|
| MD5 |
779d29a1d05fe0dda753b4dcbdbfd346
|
|
| BLAKE2b-256 |
c82de6a10f6390584941e6e99e27a0a7b855c73a39d717861349aaaa3f0bc8af
|
File details
Details for the file lottie_inline-0.1.3-py3-none-any.whl.
File metadata
- Download URL: lottie_inline-0.1.3-py3-none-any.whl
- Upload date:
- Size: 1.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f27788b6bdcbd20357ea822b69d80124f644eee0de36d5c09d662e50faabfa6
|
|
| MD5 |
0666850b7e75b4f23e48a1c3323bde75
|
|
| BLAKE2b-256 |
b655e83c5a10c4b91440eb36697f69fb3f99f37fbbca86a847a4aac611a3e77f
|