You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+83Lines changed: 83 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,3 +3,86 @@
3
3
This is a plugin that adds support for AVIF files until official support has been added (see [this pull request](https://github.com/python-pillow/Pillow/pull/5201)).
4
4
5
5
To register this plugin with pillow you will need to add `import pillow_avif` somewhere in your application.
6
+
7
+
## how to build on Windows
8
+
9
+
- install miniforge
10
+
- install VS2019
11
+
- install git for windows
12
+
- install TortoiseGit
13
+
- install MSYS2 and add C:\MSYS\usr\bin to PATH environment variable
14
+
- download https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/win64/nasm-2.15.05-win64.zip , unzip onto C:\apps\NASM and add D:\apps\NASM to PATH environment variable.
15
+
- on Administrator miniforge prompt, pip install pillow meson
16
+
- on Administrator miniforge prompt, cd to this directory, cd winbuild and python build_prepare.py
17
+
- cd winbuild/build and build_dep_all.cmd and build_pillow_avif_plugin.cmd
18
+
- cd to this directory and python -m pip install -e .
19
+
- pip list should show pillow-avif-plugin
20
+
21
+
## encoding options
22
+
23
+
## "range"
24
+
25
+
| value | meanings |
26
+
|-----:|-----------|
27
+
| "full" | full quantization range image. ex. ST 2084 PQ requires it |
28
+
| "limited" | limited quantization range image. |
29
+
30
+
## "subsampling"
31
+
32
+
| value | meanings |
33
+
|-----:|-----------|
34
+
| "4:4:4" | YCbCr 4:4:4 or lossless GBR encoding |
35
+
| "4:2:2" | YCbCr422 |
36
+
| "4:2:0" | YCbCr420 |
37
+
| "4:0:0" | YCbCr400 |
38
+
39
+
## "depth"
40
+
41
+
color bitdepth. 8, 10 or 12
42
+
43
+
## "quality"
44
+
45
+
encoding quality, integer number ranging 0 to 100
46
+
47
+
| value | meanings |
48
+
|-----:|-----------|
49
+
| 0 | worst color encoding quality |
50
+
| 75 | default color encoding quality |
51
+
| 100 | best color encoding quality |
52
+
53
+
## "color_primaries"
54
+
55
+
| value | meanings |
56
+
|-----:|-----------|
57
+
| 1| BT.709, Rec.709 or sRGB |
58
+
| 2| Unspecified |
59
+
| 9| BT.2020, Rec.2020 or Rec.2100 |
60
+
| 12| DCI P3 or SMPTE EG 432-1 |
61
+
62
+
## "transfer_characteristics"
63
+
64
+
| value | meanings |
65
+
|-----:|-----------|
66
+
| 1| BT.709 or Rec.709 |
67
+
| 2| Unspecified |
68
+
| 6| BT.601 |
69
+
| 8| Linear |
70
+
| 13| sRGB |
71
+
| 14| BT.2020 10bit |
72
+
| 15| BT.2020 12bit |
73
+
| 16| ST 2084 PQ for Rec.2020 |
74
+
| 18| HLG |
75
+
76
+
## "matrix_coefficients"
77
+
78
+
| value | meanings |
79
+
|-----:|-----------|
80
+
| 0| Identity matrix for lossless encoding. Stores color as GBR |
0 commit comments