heiya


Nameheiya JSON
Version 2.3.0 PyPI version JSON
download
home_pagehttps://github.com/wu-hongjun/heiya
SummaryConvert between image and High Efficiency Image (HEIC/AVIF) with ease.
upload_time2023-01-08 15:55:02
maintainer
docs_urlNone
authorHongjun Wu
requires_python
licenseApache License 2.0
keywords heic avif tiff jpg imageconversion
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Heiya

> **A one-line solution for photographers to simply convert JPEG into High Efficiency Image (AVIF/HEIC) and preserve all the metadata.**

## Website
The official website of Heiya has been launched!!!!! Visit the website [here](https://heiya.hongjunwu.com/) for everything about it.

## Announcement
Heiya is iterating quickly under active development. 
Function calls and arguments will change, so please keep your version updated and refer to the newest examples in the documentation.

## Introduction
Heiya allows you to easily translate between JPG/TIFF and AVIF/HEIC, without losing image metadata such as geotag and lens information. All the common operations can be done using one line of code.

It is developed for photographers with a storage budget (like myself, lol) to build an automatic and efficient image storage pipeline.

***

JPEG was invented six years before my existence.
I'm now 24, graduating from my double Master's degree next summer.

And yet, the majority of cameras in the current age still shoot JPEG.

AVIF and HEIC are what are called "High-Efficiency Images" (You can read about them here: [AVIF vs HEIC](https://www.winxdvd.com/ios-android-mobile/avif-vs-heic.htm)). 
* These are the future of media formats, JPEG is getting deprecated.
* They can result in a file size of as much as 100x less than traditional JPEGs.
* Devices and operating systems now have good support for both formats.
* However, there are no free and easy-to-use tools out there to simply encode all the JPEGs my camera took into AVIFs while preserving metadata.

## Install Heiya from PyPI
Heiya is developed and tested on macOS and hasn't been tested on Linux, it doesn't support Windows for now.
  
```python
pip install heiya
```

## Examples
```python
"""
JPG to HEIF/AVIF
Convert JPG shoot by camera to High Efficiency Images with metadata to import to iCloud photo library.
Find this notebook in https://github.com/wu-hongjun/heiya/blob/main/jpg_hei.ipynb

How To:
Step 1: Run "pip install heiya" from Terminal (If you have not already done so).
Step 2: Copy the folder directory where all the JPGs are stored.
    Windows: File Explorer -> Go to your target folder -> Single Click address bar -> Copy the file path in address bar.
    macOS: Finder -> Go to your target folder -> Hold Alt (File path should apper in bottom left) -> Right click on folder and copy file path.
Step 3: Run this cell and wait for it to finish, it will print out progress below.
"""

import heiya
import pyperclip as clip

# Custom file path override, usually just leave it blank if you use pyperclip
source_dir = ""

# Get the image location directly from the clipboard
if source_dir == "":
    source_dir = clip.paste()
    
# This will convert all the JPG in source_dir to HEI.
# source_format = 0 -> JPG. (You don't need to change this for most of the time, you can also set to 1 for PNG.)
# target_format = 0 -> AVIF (For smaller file size but less compatible, requires iOS 16/macOS Ventura or higher).
# target_format = 1 -> HEIF (For best compatibility but slightly larger file size, requires additional extension to open on Windows).
heiya.to_hei.convert_image_in_dir_to_hei(source_dir, source_format=0, target_format=1)
```
* Some basic operations can be found in [Heiya Basic Demo Notebook](https://github.com/wu-hongjun/heiya/blob/main/heiya_basic_demo.ipynb).
* A complete set of heiya examples can be found in the [Heiya Full Demo Notebook](https://github.com/wu-hongjun/heiya/blob/main/heiya_full_demo.ipynb).

## To-Do & Help Needed
* Attempt an implementation using `imagemagick` to enable bitrate higher than the current 8 bit.

## What does the name mean?

* HEI - High Efficiency Image.
* Ya - In Chinese, 压(yā) means "to compress".

But mostly just a reference to uncle Roger's "Heiya" when he saw the BBC host rinse and drain cooked rice with tap water (smh... here's the [video](https://youtu.be/53me-ICi_f8)).

## Update History

A complete update log can be found in the [HISTORY.md](https://github.com/wu-hongjun/heiya/blob/main/HISTORY.md).

## License
Heiya is distributed with the license in [LICENSE.txt](https://github.com/wu-hongjun/heiya/blob/main/LICENSE.txt).


# Change log

## [2.3.0] - 2023-01-08
- Added auto H265 encoding capabilities. Updated example pipeline in `pipeline.ipynb`.

## [2.2.2] - 2022-12-5
- Added minor support to non dotted extensions in heiya.extensions.

## [2.2.1] - 2022-12-4
- Fixed a bug that registers incorrect HEI opener for pillow_heif.

## [2.2.0] - 2022-12-4
- Added initial experimental support for Windows.

## [2.1.0] - 2022-11-1
- Added tools for image to webp pipeline.

## [2.0.0] - 2022-10-30
- Refactored code for better expandability going forward.
- Note that this version is not compatible with the previous version, as many functions now have new arguments.

## [1.2.4] - 2022-10-15
- Fixed an issue for not being able to correctly start batch process for meta transfer.

## [1.2.3] - 2022-10-15
- Fixed an issue for not being able to detect type list.

## [1.2.2] - 2022-10-15
- Fixed a minor issue for meta transfer not being able to properly loaded to the machine.

## [1.2.1] - 2022-10-15
- Fixed a minor issue for meta transfer not being able to properly loaded to the machine. (Fix did not work)

## [1.2.0] - 2022-10-15
- Added `meta_transfer.batch_img_meta_transfer()` for batch film digitizing workflow.

## [1.1.0] - 2022-10-15
- Added `meta_transfer.img_meta_transfer()` for easier film digitizing workflow.

## [1.0.0] - 2022-10-04
- First official release, with all the code cleaned up and properly documented. 
  
## [0.1.4] - 2022-10-03
- Rewrote some of the old comments and docstring that doesn't make sense anymore.
  
## [0.1.3] - 2022-10-02
- Fixed minor bug where the log does not appear properly when transcoding multiple formats.
  
## [0.1.2] - 2022-10-02
- Renamed `he_jpg.py` to `he_img.py` for better file type support. 
- Fixed a potential issue that can delete all JPG when using the old `heiya.he_jpg`.
  
## [0.1.1] - 2022-10-02
- Wrote a more intuitive `READEME.md`, and updated `haiya_demo.ipynb` on Github.

## [0.1.0] - 2022-10-02
- Attempting to fix an issue of incorrect param call from `heiya.he_jpg.convert_jpg_to_he_jpg`.

## [0.0.9] - 2022-10-02
- Unsuccessful fix for an issue of incorrect param call from `heiya.he_jpg.convert_jpg_to_he_jpg`.

## [0.0.8] - 2022-10-02
- Standarized function names for `from_hei` and `to_hei`.

## [0.0.7] - 2022-10-02
- Fixed an issue of internal packages not being able to properly import.

## [0.0.6] - 2022-10-02
- Added extensions and tools to `__init__.py` to fix referencing issue.

## [0.0.5] - 2022-10-02
- Removed the requirement for `glob`.

## [0.0.4] - 2022-10-02
- Removed the requirement for `os`.

## [0.0.3] - 2022-10-02
- Code cleanup.

## [0.0.2] - 2022-10-02
- Initial upload.

## [0.0.1] - 2022-10-01
- Created the project.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/wu-hongjun/heiya",
    "name": "heiya",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "HEIC,AVIF,TIFF,JPG,ImageConversion",
    "author": "Hongjun Wu",
    "author_email": "hw434@cornell.edu",
    "download_url": "https://files.pythonhosted.org/packages/34/88/694f9539a701687015d266d66a8ca7b0018c347878bc0d9829aa75dc44a9/heiya-2.3.0.tar.gz",
    "platform": null,
    "description": "# Heiya\n\n> **A one-line solution for photographers to simply convert JPEG into High Efficiency Image (AVIF/HEIC) and preserve all the metadata.**\n\n## Website\nThe official website of Heiya has been launched!!!!! Visit the website [here](https://heiya.hongjunwu.com/) for everything about it.\n\n## Announcement\nHeiya is iterating quickly under active development. \nFunction calls and arguments will change, so please keep your version updated and refer to the newest examples in the documentation.\n\n## Introduction\nHeiya allows you to easily translate between JPG/TIFF and AVIF/HEIC, without losing image metadata such as geotag and lens information. All the common operations can be done using one line of code.\n\nIt is developed for photographers with a storage budget (like myself, lol) to build an automatic and efficient image storage pipeline.\n\n***\n\nJPEG was invented six years before my existence.\nI'm now 24, graduating from my double Master's degree next summer.\n\nAnd yet, the majority of cameras in the current age still shoot JPEG.\n\nAVIF and HEIC are what are called \"High-Efficiency Images\" (You can read about them here: [AVIF vs HEIC](https://www.winxdvd.com/ios-android-mobile/avif-vs-heic.htm)). \n* These are the future of media formats, JPEG is getting deprecated.\n* They can result in a file size of as much as 100x less than traditional JPEGs.\n* Devices and operating systems now have good support for both formats.\n* However, there are no free and easy-to-use tools out there to simply encode all the JPEGs my camera took into AVIFs while preserving metadata.\n\n## Install Heiya from PyPI\nHeiya is developed and tested on macOS and hasn't been tested on Linux, it doesn't support Windows for now.\n  \n```python\npip install heiya\n```\n\n## Examples\n```python\n\"\"\"\nJPG to HEIF/AVIF\nConvert JPG shoot by camera to High Efficiency Images with metadata to import to iCloud photo library.\nFind this notebook in https://github.com/wu-hongjun/heiya/blob/main/jpg_hei.ipynb\n\nHow To:\nStep 1: Run \"pip install heiya\" from Terminal (If you have not already done so).\nStep 2: Copy the folder directory where all the JPGs are stored.\n    Windows: File Explorer -> Go to your target folder -> Single Click address bar -> Copy the file path in address bar.\n    macOS: Finder -> Go to your target folder -> Hold Alt (File path should apper in bottom left) -> Right click on folder and copy file path.\nStep 3: Run this cell and wait for it to finish, it will print out progress below.\n\"\"\"\n\nimport heiya\nimport pyperclip as clip\n\n# Custom file path override, usually just leave it blank if you use pyperclip\nsource_dir = \"\"\n\n# Get the image location directly from the clipboard\nif source_dir == \"\":\n    source_dir = clip.paste()\n    \n# This will convert all the JPG in source_dir to HEI.\n# source_format = 0 -> JPG. (You don't need to change this for most of the time, you can also set to 1 for PNG.)\n# target_format = 0 -> AVIF (For smaller file size but less compatible, requires iOS 16/macOS Ventura or higher).\n# target_format = 1 -> HEIF (For best compatibility but slightly larger file size, requires additional extension to open on Windows).\nheiya.to_hei.convert_image_in_dir_to_hei(source_dir, source_format=0, target_format=1)\n```\n* Some basic operations can be found in [Heiya Basic Demo Notebook](https://github.com/wu-hongjun/heiya/blob/main/heiya_basic_demo.ipynb).\n* A complete set of heiya examples can be found in the [Heiya Full Demo Notebook](https://github.com/wu-hongjun/heiya/blob/main/heiya_full_demo.ipynb).\n\n## To-Do & Help Needed\n* Attempt an implementation using `imagemagick` to enable bitrate higher than the current 8 bit.\n\n## What does the name mean?\n\n* HEI - High Efficiency Image.\n* Ya - In Chinese, \u538b(y\u0101) means \"to compress\".\n\nBut mostly just a reference to uncle Roger's \"Heiya\" when he saw the BBC host rinse and drain cooked rice with tap water (smh... here's the [video](https://youtu.be/53me-ICi_f8)).\n\n## Update History\n\nA complete update log can be found in the [HISTORY.md](https://github.com/wu-hongjun/heiya/blob/main/HISTORY.md).\n\n## License\nHeiya is distributed with the license in [LICENSE.txt](https://github.com/wu-hongjun/heiya/blob/main/LICENSE.txt).\n\n\n# Change log\n\n## [2.3.0] - 2023-01-08\n- Added auto H265 encoding capabilities. Updated example pipeline in `pipeline.ipynb`.\n\n## [2.2.2] - 2022-12-5\n- Added minor support to non dotted extensions in heiya.extensions.\n\n## [2.2.1] - 2022-12-4\n- Fixed a bug that registers incorrect HEI opener for pillow_heif.\n\n## [2.2.0] - 2022-12-4\n- Added initial experimental support for Windows.\n\n## [2.1.0] - 2022-11-1\n- Added tools for image to webp pipeline.\n\n## [2.0.0] - 2022-10-30\n- Refactored code for better expandability going forward.\n- Note that this version is not compatible with the previous version, as many functions now have new arguments.\n\n## [1.2.4] - 2022-10-15\n- Fixed an issue for not being able to correctly start batch process for meta transfer.\n\n## [1.2.3] - 2022-10-15\n- Fixed an issue for not being able to detect type list.\n\n## [1.2.2] - 2022-10-15\n- Fixed a minor issue for meta transfer not being able to properly loaded to the machine.\n\n## [1.2.1] - 2022-10-15\n- Fixed a minor issue for meta transfer not being able to properly loaded to the machine. (Fix did not work)\n\n## [1.2.0] - 2022-10-15\n- Added `meta_transfer.batch_img_meta_transfer()` for batch film digitizing workflow.\n\n## [1.1.0] - 2022-10-15\n- Added `meta_transfer.img_meta_transfer()` for easier film digitizing workflow.\n\n## [1.0.0] - 2022-10-04\n- First official release, with all the code cleaned up and properly documented. \n  \n## [0.1.4] - 2022-10-03\n- Rewrote some of the old comments and docstring that doesn't make sense anymore.\n  \n## [0.1.3] - 2022-10-02\n- Fixed minor bug where the log does not appear properly when transcoding multiple formats.\n  \n## [0.1.2] - 2022-10-02\n- Renamed `he_jpg.py` to `he_img.py` for better file type support. \n- Fixed a potential issue that can delete all JPG when using the old `heiya.he_jpg`.\n  \n## [0.1.1] - 2022-10-02\n- Wrote a more intuitive `READEME.md`, and updated `haiya_demo.ipynb` on Github.\n\n## [0.1.0] - 2022-10-02\n- Attempting to fix an issue of incorrect param call from `heiya.he_jpg.convert_jpg_to_he_jpg`.\n\n## [0.0.9] - 2022-10-02\n- Unsuccessful fix for an issue of incorrect param call from `heiya.he_jpg.convert_jpg_to_he_jpg`.\n\n## [0.0.8] - 2022-10-02\n- Standarized function names for `from_hei` and `to_hei`.\n\n## [0.0.7] - 2022-10-02\n- Fixed an issue of internal packages not being able to properly import.\n\n## [0.0.6] - 2022-10-02\n- Added extensions and tools to `__init__.py` to fix referencing issue.\n\n## [0.0.5] - 2022-10-02\n- Removed the requirement for `glob`.\n\n## [0.0.4] - 2022-10-02\n- Removed the requirement for `os`.\n\n## [0.0.3] - 2022-10-02\n- Code cleanup.\n\n## [0.0.2] - 2022-10-02\n- Initial upload.\n\n## [0.0.1] - 2022-10-01\n- Created the project.\n",
    "bugtrack_url": null,
    "license": "Apache License 2.0",
    "summary": "Convert between image and High Efficiency Image (HEIC/AVIF) with ease.",
    "version": "2.3.0",
    "split_keywords": [
        "heic",
        "avif",
        "tiff",
        "jpg",
        "imageconversion"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ba644b72ebfc685dcffab9921f03861b5f57fc90f1ce3fc1b92377e8889de67d",
                "md5": "f8848ae71bdfab3657dfe940bbfce881",
                "sha256": "0d202f0c2291ea4d9bac5b5400cc1053ec9d0bcb4a06341b9cbfbf9cd034445f"
            },
            "downloads": -1,
            "filename": "heiya-2.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f8848ae71bdfab3657dfe940bbfce881",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 17796,
            "upload_time": "2023-01-08T15:55:00",
            "upload_time_iso_8601": "2023-01-08T15:55:00.783973Z",
            "url": "https://files.pythonhosted.org/packages/ba/64/4b72ebfc685dcffab9921f03861b5f57fc90f1ce3fc1b92377e8889de67d/heiya-2.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3488694f9539a701687015d266d66a8ca7b0018c347878bc0d9829aa75dc44a9",
                "md5": "2b320fc0648084cb6b4e502062fe5a20",
                "sha256": "e2b23d72dba82967a8ad86f13e5fb88d43b9348e363495337bc7e707c02cfd95"
            },
            "downloads": -1,
            "filename": "heiya-2.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "2b320fc0648084cb6b4e502062fe5a20",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 17644,
            "upload_time": "2023-01-08T15:55:02",
            "upload_time_iso_8601": "2023-01-08T15:55:02.645415Z",
            "url": "https://files.pythonhosted.org/packages/34/88/694f9539a701687015d266d66a8ca7b0018c347878bc0d9829aa75dc44a9/heiya-2.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-08 15:55:02",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "wu-hongjun",
    "github_project": "heiya",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "heiya"
}
        
Elapsed time: 0.05551s