From 24bd7be19bd170ccdd8900df38dc1462b2244366 Mon Sep 17 00:00:00 2001 From: zerolab Date: Thu, 13 Jul 2023 17:55:23 +0100 Subject: [PATCH] Add optional heif dependency to allow installing via willow[heif] --- docs/installation.rst | 16 ++++++++++++++++ pyproject.toml | 5 ++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/docs/installation.rst b/docs/installation.rst index 7619a9f..399de99 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -22,3 +22,19 @@ or Wand. Note that Pillow doesn't support animated GIFs and Wand isn't as fast. Installing both will give best results. + + +HEIC and AVIF support +^^^^^^^^^^^^^^^^^^^^^ + +When using Pillow, you need to install ``pillow-heif`` for AVIF and HEIC support: + +.. code-block:: shell + + pip install pillow-heif + # or + pip install Willow[heif] + +When using Wand, you will need ImageMagick version 7.0.25 or newer. + +Both Pillow and Wand require ``libheif`` to be installed on your system for full HEIC support. diff --git a/pyproject.toml b/pyproject.toml index 12c7af8..0340c90 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,11 +30,14 @@ dependencies = [ ] [project.optional-dependencies] +heif = [ + "pillow-heif>=0.10.0,<1.0.0", +] testing = [ "Pillow>=9.1.0,<11.0.0", "Wand>=0.6,<1.0", "mock>=3.0,<4.0", - "pillow-heif>=0.7.0,<1.0.0", + "pillow-heif>=0.10.0,<1.0.0", "black==22.3.0", "ruff==0.0.275", "coverage[toml]>=7.2.7,<8.0",