diff options
| author | S. Solomon Darnell | 2025-03-28 21:52:21 -0500 |
|---|---|---|
| committer | S. Solomon Darnell | 2025-03-28 21:52:21 -0500 |
| commit | 4a52a71956a8d46fcb7294ac71734504bb09bcc2 (patch) | |
| tree | ee3dc5af3b6313e921cd920906356f5d4febc4ed /.venv/lib/python3.12/site-packages/pillow_heif/_lib_info.py | |
| parent | cc961e04ba734dd72309fb548a2f97d67d578813 (diff) | |
| download | gn-ai-master.tar.gz | |
Diffstat (limited to '.venv/lib/python3.12/site-packages/pillow_heif/_lib_info.py')
| -rw-r--r-- | .venv/lib/python3.12/site-packages/pillow_heif/_lib_info.py | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/.venv/lib/python3.12/site-packages/pillow_heif/_lib_info.py b/.venv/lib/python3.12/site-packages/pillow_heif/_lib_info.py new file mode 100644 index 00000000..a2d0bc03 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/pillow_heif/_lib_info.py @@ -0,0 +1,36 @@ +"""Functions to get versions of underlying libraries.""" + +try: + import _pillow_heif +except ImportError as ex: + from ._deffered_error import DeferredError + + _pillow_heif = DeferredError(ex) + + +def libheif_version() -> str: + """Returns ``libheif`` version.""" + return _pillow_heif.get_lib_info()["libheif"] + + +def libheif_info() -> dict: + """Returns a dictionary with version information. + + The keys `libheif`, `HEIF`, `AVIF`, `encoders`, `decoders` are always present, but values for all except + `libheif` can be empty. + + { + 'libheif': '1.15.2', + 'HEIF': 'x265 HEVC encoder (3.4+31-6722fce1f)', + 'AVIF': 'AOMedia Project AV1 Encoder 3.5.0', + 'encoders': { + 'encoder1_id': 'encoder1_full_name', + 'encoder2_id': 'encoder2_full_name', + }, + 'decoders': { + 'decoder1_id': 'decoder1_full_name', + 'decoder2_id': 'decoder2_full_name', + }, + } + """ + return _pillow_heif.get_lib_info() |
