Python bindings for libavif
Project description
Python bindings for libavif (via CFFI)
Installation from PyPI
avif is available via PyPI, with wheels built for many common platforms. It can be installed via your favorite Python package manager, e.g.:
$ pip install avif
Or if you want to use Pillow integration:
$ pip install avif[pillow]
Installation from source
To install this module from source you will need to compile libavif yourself. If you want to make use of the decoder you will also need to compile one (decoders/encoders can be compiled from libavif).
List of available AV1 decoders:
If you compile avif without an AV1 decoder you will get AVIFError: No codec available raised when you try to get a result, but you will still be able to import python module.
The installation steps below show how to compile libavif with the aom decoder.
Platform-Specific Steps
Examples
Examples can be found under examples directory.
You can use sample.avif if you don’t have any avif encoded image for testing. Sample is 128x128 pixels in size and it’s all white (RGBA: 255, 255, 255, 255).
To test if library works properly you can run:
$ python examples/avif_example_decode_file.py examples/sample.avif
Correct output:
Parsed AVIF: 128x128 (8bpc)
* First pixel: RGBA(255, 255, 255, 255)
Or to test Pillow plugin:
$ python examples/avif_example_pillow_decode_file.py examples/sample.avif
Correct output:
Parsed AVIF: 128x128 (Mode: RGBA)
* First pixel: RGBA(255, 255, 255, 255)
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
Built Distributions
Hashes for avif-0.5.0-pp37-pypy37_pp73-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d2c1f58c73b2e14d4c32bdf91e35d4e116b72a322347a1912b6c91570b5272c |
|
MD5 | 2ee7b96e718578ed95fc3592fa097b63 |
|
BLAKE2b-256 | 231ab31787a0542aa0ba193f32408895fdf297dd0c6991bea5625d360355d949 |
Hashes for avif-0.5.0-pp37-pypy37_pp73-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e56e90627586b796cb8683b8116a3f0f004f43eca6798c5f45ef69189d01fd5 |
|
MD5 | 14e58aa9f02728d0c9bbc48999992329 |
|
BLAKE2b-256 | 4a2713fb7236a2de227dca6149a4fb94c2089f265de2b94be1ada5dccd6cdd88 |
Hashes for avif-0.5.0-pp37-pypy37_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b6e4b129f32bedadf339e7f25b1bb07f23ca4b042f4371611dc6f6ea0794299 |
|
MD5 | b99e214c76dc996aac41dbd4c7b2813a |
|
BLAKE2b-256 | b190935068bac5468fce5504a9e1693996f880d174e9bb329389f7450a6c6899 |
Hashes for avif-0.5.0-pp36-pypy36_pp73-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48bcd5baa44f87c42194063cf940c6cb5f4da338505561b3586990d51724734e |
|
MD5 | 0e10e7336c89072a2b154eb36a25feb6 |
|
BLAKE2b-256 | fb803c0d1873058f09452e428c40ac22f588e9c8462d0e9fd4e52900572c53c6 |
Hashes for avif-0.5.0-pp36-pypy36_pp73-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fefba160c45d9f273fef0d941b1e0917582c7e004e761f64f5bd81ee3485a8ae |
|
MD5 | a102fa4027001e7a456873c7cdee1543 |
|
BLAKE2b-256 | 7ea9ef7502e11cf062a85271f7eaa3233b218eef559afb0fc4e6074f4315daa5 |
Hashes for avif-0.5.0-pp36-pypy36_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6cfece78033c9eefff895ec7e7920432fb14688a9b765bfa78579a85ce426bf2 |
|
MD5 | 1531b2bbd24869f743824c5541c344b1 |
|
BLAKE2b-256 | 4b5b50f325cd44ec8825aaafc4f5f4568a0c8f519a1280175fb30ffcac439618 |
Hashes for avif-0.5.0-pp27-pypy_73-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e94aecceaf204ac7b82fab2c4297a33815bee9a1c2eeca441ffcd376f32ed53 |
|
MD5 | 59a1ab48cdd7f56ba93ed094d5e07313 |
|
BLAKE2b-256 | 19faf8cc601100077dc935568b5c828029cf4f344c65b11068ca7ec3ca11a11f |
Hashes for avif-0.5.0-pp27-pypy_73-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fa850bd407a18442dabd11b8ab2d6faec4129f85b62b06f7bf060b23de7a87e |
|
MD5 | e491990c4b631b8002f0b4feab5e853e |
|
BLAKE2b-256 | 13215d4acba8faa6d599653c124ad63cfdc703849a402fae166f00f6126fff60 |
Hashes for avif-0.5.0-pp27-pypy_73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03ac966eb15bc4f189522405a7fccb910c76b701ac77b77b64d1ce292a0be22e |
|
MD5 | f432db2bd601296d3d60ca764c649c02 |
|
BLAKE2b-256 | 8ab6f65bff37c223a9a4d876b8cb5d10a17fd67e95094339770250397241957c |
Hashes for avif-0.5.0-cp39-cp39-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39cd02acdf30128d93d628d1105890ae057b310a0a3d93f0f77c6322efd832de |
|
MD5 | 670b71b565372c6a824d6f447466e302 |
|
BLAKE2b-256 | 4bf0ecce459a55747fcabe4b3483bb3d4270d20e593190b3fc8704c0863c0bab |
Hashes for avif-0.5.0-cp39-cp39-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1fdc0b69ed739e4af118b41c68ce846978e927ceb514e79680ebb6e0c4c16c6 |
|
MD5 | a3d373144d7c83d035b27875b21ef52d |
|
BLAKE2b-256 | 85dda5c2bc645fd69b7b644aae072a7e0fb472859553a9a790470012e032f781 |
Hashes for avif-0.5.0-cp39-cp39-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56f9d99120ecf1847c1289d00bd2d168bf784573ef1f54595ddb0d7879d6e1ec |
|
MD5 | 6b3058f3cc40ac6b6cb1af476be52fc6 |
|
BLAKE2b-256 | 69e4c61ba6df7925088274f02981bfb2d2efcde1e37835e4b8fa16f41565527b |
Hashes for avif-0.5.0-cp39-cp39-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3475c24ef63c0a0e8a9b83a454f0339715fa19aa011e505166b5b7a12aaab43 |
|
MD5 | 9e59eb0211733f0d2e4a6a6b37eecb78 |
|
BLAKE2b-256 | 0a4faddcb30da6dde1653739c560be2083d91abae300860255fe85396234fdc2 |
Hashes for avif-0.5.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f388d7a508fe57d700ced1b75e2137420b848689bd1fdf4e4d168525b9ac296f |
|
MD5 | 3d4bbde74843fef6bf3c60cd80a845ae |
|
BLAKE2b-256 | 43828cbc68da6d8ee859d1d3cd0fdcb25381deaacbff831213fa6de8285cbeb9 |
Hashes for avif-0.5.0-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5828ed35ac382eb445f575284999ec907735bacc3e5a6ac38beec2c2b5b3294f |
|
MD5 | f9bb5bd35f30af258c97d71c30f02887 |
|
BLAKE2b-256 | a17c52431b03ee00a9a293c4b960eb8b91f892dd37d63a00ae289aafec026bf5 |
Hashes for avif-0.5.0-cp38-cp38-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9f6a34b28d44504102f26440ac12cf699d6479467d88a71ee6dc42b3ff2e5a7 |
|
MD5 | 5e28846f73c6d07e696e68fa21ed9fff |
|
BLAKE2b-256 | 5d65de93c0447af975bec6ac88d1ae0155b764e5951f8710d963e35e3a8050a9 |
Hashes for avif-0.5.0-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 752033b3e2cabc35aada64dce2d9aba0edecbd755d0f6ddbdc876c927a00ce02 |
|
MD5 | 9dc6f83699483257fc01a0c78247bf32 |
|
BLAKE2b-256 | bdba437b9e2d384f6ee0a60d4757918cb1050f851f3ef22a6175ca20e3a7672c |
Hashes for avif-0.5.0-cp38-cp38-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7eb39ec29c3c8afc757175a0e532b9241a53b0adc3103f7d8c282d788e3933a8 |
|
MD5 | 569d1f483a11b28127abf2b62689e81a |
|
BLAKE2b-256 | a15c307aecdc7efb920d3d41f3e5d00174292560f5ca6468f324a5bdf30d1880 |
Hashes for avif-0.5.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7460382242cf435bb58b15635be1e14ebed8e533cbe6932306729456af873c10 |
|
MD5 | 463947ccf8b571d27a82c058deff099c |
|
BLAKE2b-256 | e84b890667a81b6292c9e266c307015d66370769652dd88a2f7fa795ce024147 |
Hashes for avif-0.5.0-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc419d6de4a7de214b75ae3bbfcfaa4965492c0f0204efd886fd34c68fe777c5 |
|
MD5 | da5cca841c4ec92571ed11428e192623 |
|
BLAKE2b-256 | 3c7157ae828bd0744f0854c254d3a271bc5e7a6a68815843031c3c6807db5cd9 |
Hashes for avif-0.5.0-cp37-cp37m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8489cab3e4fb7766dd165b7f8eed3ac93ede6d758d1ac73970dc62e8ded5bf2 |
|
MD5 | 29ad7194b3e03ba5fb57e4fe6c43a0ee |
|
BLAKE2b-256 | c92d42a0274a62963886caaa3a22c1b68d216a3ad299b858206dee24458760bd |
Hashes for avif-0.5.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc38e3790682902951bc9804f3df3c5817025e071f71e190bbd912323356196a |
|
MD5 | 4647428d58d07392a4422aff3cba041a |
|
BLAKE2b-256 | 140c79932eb7ce652006e3e03eec9d9cb183aa8aaa41cc90359c70ac9f160a0f |
Hashes for avif-0.5.0-cp37-cp37m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4ff4f4bd064be2e2c0dc336d295420dcf39aaa5fad04a642de7f4a1f525a94c |
|
MD5 | 5fed67a695766fd1b4b96778418f80c5 |
|
BLAKE2b-256 | b6b21c44510a92d2b6a8a80491ced02a103816044763f8e2accf16a12777ff94 |
Hashes for avif-0.5.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3336d3f1d6778a2569627440d53e2f21606dc7ab09a32585177e1cd86f1f3113 |
|
MD5 | 1315ca199ea2f2da8e42756140f664be |
|
BLAKE2b-256 | 7af39c6972bb7ded9a34f3b42d948cc583219a4d4c1e2e036438a2957ccaa435 |
Hashes for avif-0.5.0-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 869e59f6f907cfe4e39aa6d8aa7b69368ca7d39668697a7c51ec8222f75123a8 |
|
MD5 | 540c013ba9e9e4e9880e6c4595cee89b |
|
BLAKE2b-256 | 34d7b84317ac65418c8a7806583d29cd602e24f85f32272fd3baf61ebf51cbef |
Hashes for avif-0.5.0-cp36-cp36m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c3654f99357621c9dbb96359edfbe041a7e2ed4391e026754598d4ab519ecdb |
|
MD5 | 1e2b881c4390a2fb981abd7b777b32f5 |
|
BLAKE2b-256 | ab4a22e1a33064a5722f54ec818e225a15a69757628234050cad0a7be5c7a34e |
Hashes for avif-0.5.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae89e0985e7cba3e00100f02d0c05072af64a0c1655cd13fd8dcf0c967dad3e7 |
|
MD5 | cc8baa8551eedf1d7ea9132e8592ddc5 |
|
BLAKE2b-256 | 76a21ebda48f255fa00d14ce4c055ac2d03c5651ebd174c0137278e4b8a67cfd |
Hashes for avif-0.5.0-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7edfa28ff25e63f9b90da2954defa8a390fa6010e933013b5baddccc68e8d63 |
|
MD5 | 4063bd74e06da021e2bc690376a7053d |
|
BLAKE2b-256 | c02da76e1f6ed8cd8304afd2752b577d19c07622aaab49ac99eaa8498eeeb23d |
Hashes for avif-0.5.0-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89e90705bbccf5b388e39e6c3ff59be938b4f642284e678fe7921299a2ef9797 |
|
MD5 | bf41ef0aabc2df8e55f21489f4c58e50 |
|
BLAKE2b-256 | 5b91f2d91c4a107329e6f1162c7ee4fce31affd0efe91cbcdb3a268132bcd896 |
Hashes for avif-0.5.0-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99de626cf51858964d419434a21cfe7729aaa2c276ae28df9d99cb6b3543624f |
|
MD5 | e3308be08f10a05393a402ec4c0f6bbb |
|
BLAKE2b-256 | c2f2a90f3b2d5ccf3097b31181776d97ca480dffe06181db0945cfdac1a90a53 |
Hashes for avif-0.5.0-cp35-cp35m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3469a2c01b4c9da2a0f320077a0b9880374052b559157c5721136d566448364 |
|
MD5 | 7b7d9a79d26ab2323624f76a3bb23b82 |
|
BLAKE2b-256 | 69edd82c9fec133d53f0114be307621239713f910918c29a5ed68d4b1971da03 |
Hashes for avif-0.5.0-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ce959feb96e498e32105e53fee77c7c28e19934523f0c606e0bbb0a885be9b1 |
|
MD5 | bd0f4322e167257c540d4eb90a070374 |
|
BLAKE2b-256 | 930df991ed419ad747c1862a45ac4b8cb7848e4ffa97ab5542f97e5c5e0eaf48 |
Hashes for avif-0.5.0-cp35-cp35m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 826255312101b2a61e7edfcedd4858fdd701b7dcc6d6da70d62feb7c7cd75ac5 |
|
MD5 | ae15f3777acf00d316f892480e20d2b8 |
|
BLAKE2b-256 | 2d90dddf1fb8e88d8c1be270c628bdd9896133b5bcde9a7b103a296c9f146e2e |
Hashes for avif-0.5.0-cp35-cp35m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03fa07a0d44bbf9f231ff2bc2e10d1e832c8379dfffbecafa1f076351712b2da |
|
MD5 | ba590d9bfee9136bd0d5224713ac6c8a |
|
BLAKE2b-256 | 3efa43f69508599e842602a1c9c4c37e7addee9d5d8fdfa9dec91fa43c10479b |