Convert image to High Efficiency Image (HEIC/AVIF) and back with ease.
Project description
Heiya
A one line solution for photographers who are looking to replace their JPEGs with High Efficiency Images(HEIs).
Introduction
High Efficiency Image (HEI) - Ya!
Get it?
It is unbelieveable that JPEG is from... last century. And the majority of cameras in the current age shoot JPG. Some can encode using HEIC (iPhone, Fujifilm X-H2S, ...), but that codec is inside a paywall. Most cameras do not support AVIF, but it is the future for image codec and many operating system already support AV1 (and therefore AVIF).
HEIC and AVIF are what is called "High Efficiency Images", and can result in file size 10x less than traditional JPEGs. However, there is no easy solution to simply convert JPEG/TIFF to HEIC/AVIF and preserve all the metadata.
Heiya is an open source wrapper for easy High Efficiency Image (AVIF/HEIC) to and from JPG conversion. It is developed for photographers to build a more automatic and space saving pipeline.
Install Heiya
Install from PIP
pip install heiya
System Requirements
Due to some of the current dependencies of Heiya only runs on macOS, some features might not be available in Windows. Heiya is developed on macOS and isn't tested on Linux or other OS.
Examples
Getting Started
import heiya
Define Source Directory
# Option 1: Define it by yourself
source_dir = ""
# Option 2: Get the directory directly from the clipboard
import pyperclip as clip
if source_dir == "":
source_dir = clip.paste()
Batch JPG/TIF -> HEI in directory
heiya.to_hei.convert_image_in_dir(source_dir, source_tif=False, source_jpg=True,
target_hif=False, target_avif=True)
Batch IMG -> HEI in directory using depth
Example:
/Photos/2022/01/20220105/img1.jpg, ...
Then with source_dir = "/Photos":
depth = 0 -> "/Photos"
depth = 1 -> "/Photos/2022"
depth = 2 -> "/Photos/2022/01"
depth = 3 -> "/Photos/2022/01/20220105"
heiya.to_hei.convert_all_sub_folders_to_hei(source_dir, source_tif=False, source_jpg=False,
target_hif=False, target_avif=False, depth=2)
Batch HEI -> JPG in directory
heiya.from_hei.convert_hei_in_dir_to_jpg(source_dir, source_hif=False,
source_avif=False, fix_rotation=True)
Batch JPG -> HEI -> JPG in directory
heiya.tools.convert_jpg_to_he_jpg(source_dir, use_hif=False,
use_avif=True, preserve_original_jpg=True)
Delete files with a specific extension in directory
heiya.tools.delete_image_in_dir(source_dir, tif=False, jpg=False, hif=False, avif=False)
Change log
[0.0.4] - 2022-10-02
- Removed the requirement for os.
- Not production ready yet.
[0.0.3] - 2022-10-02
- Code cleanup, not production ready yet.
[0.0.2] - 2022-10-02
- Initial upload, not production ready yet.
[0.0.1] - 2022-10-01
- Created the project, not production ready yet.
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 Distribution
File details
Details for the file heiya-0.0.4.tar.gz
.
File metadata
- Download URL: heiya-0.0.4.tar.gz
- Upload date:
- Size: 11.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99f419d3976c6a5941abb20dc8d5e9a43dcff5a31d8171de8151da08f5199da8 |
|
MD5 | f7cdc50472aa1fdf90a4676e1732c7b0 |
|
BLAKE2b-256 | 68b0e1573c8d31aa0214bc256ca25ad54ce72404a0a1d482295362da0e13334c |
File details
Details for the file heiya-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: heiya-0.0.4-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6fa70448a8394b73976743ef2bb6c139c4b61d74b38056a9f8dd888eb7c4facc |
|
MD5 | 95de848bd8e71c98a3ab1f915b7a606a |
|
BLAKE2b-256 | c1423bd07f702dfd82e503408fb9c3f61c5fc6c0ace1c50c66d71fd0b875ae73 |