cykooz / cykooz.heif Goto Github PK
View Code? Open in Web Editor NEWIt is a simple python wrapper for the Rust library "libheif-rs".
License: MIT License
It is a simple python wrapper for the Rust library "libheif-rs".
License: MIT License
The Docker build script for wheels currently builds for Python 3.6 through 3.9. Now that Python 3.10 is out and gaining traction it would be hugely helpful to the community if you could add 3.10 to this list and push a wheel for 3.10 to to PyPI.
By the way, thank you very much for creating this!
Hi,
Running on Debian10, here below my the error:
root@t1:/usr/src/libheif#` python3
Python 3.7.3 (default, Jul 25 2020, 13:03:44)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from cykooz.heif.image import RawHeifImage
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.7/dist-packages/cykooz/heif/image.py", line 9, in <module>
from cykooz.heif.rust_heif import (
ImportError: /usr/local/lib/python3.7/dist-packages/cykooz/heif/rust_heif.cpython-37m-x86_64-linux-gnu.so: undefined symbol: heif_check_filetype
To install cykooz.heif (without issue):
# export RUSTFLAGS='-L /usr/src/libheif/libheif/.libs -L /usr/src/libde265/libde265/.libs/'
# pip3 install --force-reinstall --no-cache-dir cykooz.heif
Collecting cykooz.heif
Downloading https://files.pythonhosted.org/packages/de/2f/b4ececebec346edba12e2a238f75f9b201cc6994fa3820c429e32ad1f358/cykooz.heif-0.10.2.tar.gz
Installing collected packages: cykooz.heif
Found existing installation: cykooz.heif 0.10.2
Uninstalling cykooz.heif-0.10.2:
Successfully uninstalled cykooz.heif-0.10.2
Running setup.py install for cykooz.heif ... done
Successfully installed cykooz.heif-0.10.2
Thank you for all!
When installing the package from pip the compiling fails on the libheif-rs rust package step.
error[E0063]: missing fields `macOS_compatibility_workaround`, `save_two_colr_boxes_when_ICC_and_nclx_available` in initializer of `heif_encoding_options`
--> /home/rob/.cargo/registry/src/github.com-1ecc6299db9ec823/libheif-rs-0.11.0/src/encoder.rs:175:9
|
175 | lh::heif_encoding_options {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ missing `macOS_compatibility_workaround`, `save_two_colr_boxes_when_ICC_and_nclx_available`
I have no experience with rust but looking at the 2 repos points me to
https://github.com/Cykooz/libheif-rs/blob/398bfadcaf59fb7b48559693e69bd583f6aa536d/src/encoder.rs#L154
missing the newly added fields from
https://github.com/Cykooz/libheif-sys/blob/3e4573b10084760c093789604debd778bfd6a5e2/src/bindings.rs#L1582
How to reproduce:
pip install cykooz.heif
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.