heif-image-plugin


Nameheif-image-plugin JSON
Version 0.6.1 PyPI version JSON
download
home_pagehttps://github.com/uploadcare/heif-image-plugin
SummarySimple HEIF/HEIC images plugin for Pillow base on pyhief library.
upload_time2024-01-16 10:37:06
maintainer
docs_urlNone
authorAlexander Karpinsky
requires_python
licenseMIT
keywords heif heic pillow plugin pyhief
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # heif-image-plugin

[![build](https://travis-ci.org/uploadcare/heif-image-plugin.svg?branch=master)](https://travis-ci.org/uploadcare/heif-image-plugin)
[![coverage](https://img.shields.io/codecov/c/gh/uploadcare/heif-image-plugin)](https://codecov.io/gh/uploadcare/heif-image-plugin)
[![Py Versions](https://img.shields.io/pypi/pyversions/heif-image-plugin)](https://pypi.python.org/pypi/heif-image-plugin/)
[![license](https://img.shields.io/github/license/uploadcare/heif-image-plugin)](https://pypi.python.org/pypi/heif-image-plugin/)

Simple HEIF/HEIC images plugin for [Pillow](https://pillow.readthedocs.io)
base on [pyhief](https://github.com/carsales/pyheif#pyheif) library.

Originally based on the [pyheif-pillow-opener](https://github.com/ciotto/pyheif-pillow-opener)
code from Christian Bianciotto.

## Installation

You can install **heif-image-plugin** from *PyPI*:

`pip install heif-image-plugin`

## How to use

Just import once before opening an image.

```python
from PIL import Image
import HeifImagePlugin

image = Image.open('test.heic')
image.load()
```

## How to contribute

This is not a big library but if you want to contribute is very easy!

 1. clone the repository `git clone https://github.com/uploadcare/heif-image-plugin.git`
 1. install all requirements `make init`
 1. do your fixes or add new awesome features (with tests)
 1. run the tests `make test`
 1. commit in new branch and make a pull request


## Changelog

### 0.6.1

* Added compatibility with Pillow 10.1+

### 0.6.0

* Minimal supported pyheif is 0.7.1
* Added `downsampling` parameter for saving. Works only with `subsampling` == 2.
* Transformations support updated to the latest libheif and pyheif

### 0.5.1

* Fixed HEIF saving in '1' mode

### 0.5.0

* Added HEIF saving support if `heif-enc` is installed (part of libheif)
* Fixed `HeifImageFile.verify()` call
* Extensions .heic, .avif, .heif, .hif are handled by the plugin

### 0.4.0

* Bypass some decoding errors when `ImageFile.LOAD_TRUNCATED_IMAGES` is True.

### 0.3.2

* Depends on latest pyheif.

### 0.3.1

! This version requires pyheif with `pyheif.open` API. As of 2021.11.25 this API
isn't released and is in pyheif's master. See `install-pyheif-master-pillow-latest`
target in the `Makefile` to install it.

* Fixed potential vulnerability with arbitrary data in exif metadata.

### 0.3.0

! This version requires pyheif with `pyheif.open` API. As of 2021.11.25 this API
isn't released and is in pyheif's master. See `install-pyheif-master-pillow-latest`
target in the `Makefile` to install it.

* `pyheif.open` API is used for lazy images loading.
* Fixed an error when the plugin tries to load any ISOBMFF files.
* AVIF files should work before, but now this is official.
* Patched versions of `pyheif` and `libheif` with exposed transformations is supported.
  In this case opened image isn't transformed on loading and orientation is stored
  in EXIF `Orientation` tag like for all other image formats.
  This is faster and consumes less memory.

### 0.2.0

* No need to register, works after import.
* Fill `info['icc_profile']` on loading.
* Close and release file pointer after loading.
* Deconding without custom HeifDecoder(ImageFile.PyDecoder).



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/uploadcare/heif-image-plugin",
    "name": "heif-image-plugin",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "heif,heic,Pillow,plugin,pyhief",
    "author": "Alexander Karpinsky",
    "author_email": "homm86@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/de/2b/44c1422760de4470e035369df0d7ae4d3ccdf7eed71c777fd477b2bb6cf9/heif-image-plugin-0.6.1.tar.gz",
    "platform": null,
    "description": "# heif-image-plugin\n\n[![build](https://travis-ci.org/uploadcare/heif-image-plugin.svg?branch=master)](https://travis-ci.org/uploadcare/heif-image-plugin)\n[![coverage](https://img.shields.io/codecov/c/gh/uploadcare/heif-image-plugin)](https://codecov.io/gh/uploadcare/heif-image-plugin)\n[![Py Versions](https://img.shields.io/pypi/pyversions/heif-image-plugin)](https://pypi.python.org/pypi/heif-image-plugin/)\n[![license](https://img.shields.io/github/license/uploadcare/heif-image-plugin)](https://pypi.python.org/pypi/heif-image-plugin/)\n\nSimple HEIF/HEIC images plugin for [Pillow](https://pillow.readthedocs.io)\nbase on [pyhief](https://github.com/carsales/pyheif#pyheif) library.\n\nOriginally based on the [pyheif-pillow-opener](https://github.com/ciotto/pyheif-pillow-opener)\ncode from Christian Bianciotto.\n\n## Installation\n\nYou can install **heif-image-plugin** from *PyPI*:\n\n`pip install heif-image-plugin`\n\n## How to use\n\nJust import once before opening an image.\n\n```python\nfrom PIL import Image\nimport HeifImagePlugin\n\nimage = Image.open('test.heic')\nimage.load()\n```\n\n## How to contribute\n\nThis is not a big library but if you want to contribute is very easy!\n\n 1. clone the repository `git clone https://github.com/uploadcare/heif-image-plugin.git`\n 1. install all requirements `make init`\n 1. do your fixes or add new awesome features (with tests)\n 1. run the tests `make test`\n 1. commit in new branch and make a pull request\n\n\n## Changelog\n\n### 0.6.1\n\n* Added compatibility with Pillow 10.1+\n\n### 0.6.0\n\n* Minimal supported pyheif is 0.7.1\n* Added `downsampling` parameter for saving. Works only with `subsampling` == 2.\n* Transformations support updated to the latest libheif and pyheif\n\n### 0.5.1\n\n* Fixed HEIF saving in '1' mode\n\n### 0.5.0\n\n* Added HEIF saving support if `heif-enc` is installed (part of libheif)\n* Fixed `HeifImageFile.verify()` call\n* Extensions .heic, .avif, .heif, .hif are handled by the plugin\n\n### 0.4.0\n\n* Bypass some decoding errors when `ImageFile.LOAD_TRUNCATED_IMAGES` is True.\n\n### 0.3.2\n\n* Depends on latest pyheif.\n\n### 0.3.1\n\n! This version requires pyheif with `pyheif.open` API. As of 2021.11.25 this API\nisn't released and is in pyheif's master. See `install-pyheif-master-pillow-latest`\ntarget in the `Makefile` to install it.\n\n* Fixed potential vulnerability with arbitrary data in exif metadata.\n\n### 0.3.0\n\n! This version requires pyheif with `pyheif.open` API. As of 2021.11.25 this API\nisn't released and is in pyheif's master. See `install-pyheif-master-pillow-latest`\ntarget in the `Makefile` to install it.\n\n* `pyheif.open` API is used for lazy images loading.\n* Fixed an error when the plugin tries to load any ISOBMFF files.\n* AVIF files should work before, but now this is official.\n* Patched versions of `pyheif` and `libheif` with exposed transformations is supported.\n  In this case opened image isn't transformed on loading and orientation is stored\n  in EXIF `Orientation` tag like for all other image formats.\n  This is faster and consumes less memory.\n\n### 0.2.0\n\n* No need to register, works after import.\n* Fill `info['icc_profile']` on loading.\n* Close and release file pointer after loading.\n* Deconding without custom HeifDecoder(ImageFile.PyDecoder).\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Simple HEIF/HEIC images plugin for Pillow base on pyhief library.",
    "version": "0.6.1",
    "project_urls": {
        "Download": "https://github.com/uploadcare/heif-image-plugin/archive/v0.6.1.tar.gz",
        "Homepage": "https://github.com/uploadcare/heif-image-plugin"
    },
    "split_keywords": [
        "heif",
        "heic",
        "pillow",
        "plugin",
        "pyhief"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "de2b44c1422760de4470e035369df0d7ae4d3ccdf7eed71c777fd477b2bb6cf9",
                "md5": "084092a629dca460914e66bb69e0570b",
                "sha256": "666230fb9b9e7e31c1207b56ded8dde5dbbfc012e77ff368458c03871fc7f91d"
            },
            "downloads": -1,
            "filename": "heif-image-plugin-0.6.1.tar.gz",
            "has_sig": false,
            "md5_digest": "084092a629dca460914e66bb69e0570b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 6829,
            "upload_time": "2024-01-16T10:37:06",
            "upload_time_iso_8601": "2024-01-16T10:37:06.371625Z",
            "url": "https://files.pythonhosted.org/packages/de/2b/44c1422760de4470e035369df0d7ae4d3ccdf7eed71c777fd477b2bb6cf9/heif-image-plugin-0.6.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-16 10:37:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "uploadcare",
    "github_project": "heif-image-plugin",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "lcname": "heif-image-plugin"
}
        
Elapsed time: 0.18586s