Releases: bigcat88/pillow_heif
Releases · bigcat88/pillow_heif
v0.7.1
Added
- Support for images with a
premultiplied alpha
channel (Pillow does not fully support these). - (Heif)
premultiplied_alpha
read-write property. - (Heif)
to_pillow
method toHeifFile
class. - (Heif)
RGBA;16
->RGBA
conversion. - (Heif)
RGBa
->RGB
conversion.
Changed
libaom
updated from3.4.0
to3.5.0
version. changeloglibde265
updated from1.0.8
to1.0.9
.- (Heif) The
get_file_mimetype
function has been reworked and is now written in python. - (Heif) The
is_supported
function has been reworked and is now written in python. options().strict
option marked as deprecated and will be removed in0.8.0
.- (Heif)
check_heif
function marked as deprecated.
Fixed
- (Heif)
convert_to
should do nothing if the targetmode
is already the current image mode. - (AvifImagePlugin) do not register or accept
.avifs
files, libheif does not support them. - Images in
CMYK
mode will be converted forRGBA
mode during saving instead of throwingKeyError
exception.
v0.7.0
This release is fully compatible with previous versions.
Changed
libheif
updated to version1.13.0
- License for project itself changed to
Apache 2.0
v0.6.1
This release contains security and bug fixes.
Changed
- Speed boost for AVIF encoding(+50%). commit
Fixed
- (Linux, Windows) libde265: CVE-2022-1253, CVE-2021-36408, CVE-2021-36410, CVE-2021-35452, CVE-2021-36411 MSYS2 PR
- libheif: with chroma=
420
(which is a default mode) encoded images are closer to the originals with arrived patches. libheif issue - libheif: scaling of images in some cases: commit
- Total
21
patches with fixes from official libheif repo has arrived.
v0.6.0
This release is fully compatible with previous versions if you was not using AVIF
decoding before.
Added
- (Heif)
save
method accepts optional parameterformat
. Ifformat="AVIF"
output file will be encoded inh264
format usingAOM
. AvifImagePlugin
introduced. Usage:register_avif_opener()
orimport pillow_heif.AvifImagePlugin
- After registering
AvifImagePlugin
you can work with.avif
files the same way you do with.heic
Changed
- (HeifImagePlugin) By default not accepts
.avif
files, registerAvifImagePlugin
if you need that. If you usepillow_avif
then do not =) options().hevc_enc
property was removed.options().avif
property was removed.
Fixed
- Better compatibility with
pillow_avif
package. - (Linux) Wheels size decreased significantly(almost in
2x
). - (Linux) Building from source is a bit simpler, you can build it with your custom libraries from now.
- (Linux) Great speed boost for encoding with new build type(it is as fast now as in Windows builds).
v0.5.1
This release is fully compatible with 0.5.0
version.
Added
chroma=4xx
optional subsampling parameter forsave
. Equivalent toenc_params=[("chroma", "4xx")]
in old versions.
Changed
enc_params
forsave
changed type fromList[Tuple[str, str]]
toDict
. Old code will still work, but marked as deprecated.libheif_info
now returns also bundled versions ofx265
andaom
.options().avif
marked as deprecated. Starting from0.6.0
version to register anAVIF
plugin there will be a separate function and it will be disabled by default.options().hevc_enc
marked as deprecated and will be removed in0.6.0
.
Fixed
- Rare situation when exif orientation is
1
and xmp orientation different from1
present at same time. - XMP tags orientation that are generated by
exiftool
in some cases. - Updated
libaom
on Linux and Windows from3.3.0
to3.4.0
version. MacOS builds had already that version in0.5.0
. - Pillow plugin now does not register
save
methods forHEIF
format if build does not containsHEIF
encoder(for custom builds from source). - Slightly speed optimizations for working in a
Pillow
plugin mode.
v0.5.0
Thumbnails was reworked, if you was not use them before, then this release is fully compatible with 0.4.0
version.
It is a final API release, no more further changes to existing API are planned, only bugfixes if any and etc.
Added
- (Heif, HeifImagePlugin)
thumbnail
function,docs
for it. __numpy_array__
property toHeifFile
convert_to
method toHeifFile
Changed
- Wheels now are in ABI3 format for CPython(
cp3x-abi3-xxx.whl
),3x
less size on PyPi. - (Heif)
to_pillow
method, now fillsmetadata
from an original image if was called for thumbnails. - (HeifImagePlugin) During
open
current frame
in multi frame images are set to index ofPrimary Image
. - (Heif)
add_thumbnails
method moved fromHeifFile
/HeifImage
to separate file and now can accept aPIL Image
.
Fixed
- (HeifImagePlugin) Nice
speed up
for reading images having thumbnails in aPillow plugin
mode. - (HeifImagePlugin)
XMP
metadata save fromTIFF
andJPEG
. - (HeifImagePlugin)
EXIF
metadata save fromTIFF
(only for Pillow >= 9.2). - (HeifImagePlugin) - Not to change index of a current frame during saving multi frame images.
v0.4.0
Added
- (Heif) - Numpy array interface support.
- (Heif) -
add_from_bytes
method andfrom_bytes
function added. Allows to read 16-bit color images withOpenCV
(or any other library) and save it as 10(12) bit HEIF. - (Heif) -
convert_to
method toHeifImage
to provide an easy way to open 10 or 12 bit images as 16 bit forOpenCV
(or any other library) - (Heif, HeifImagePlugin) - support for saving images from
I
,I;16
,BGRA;16
,BGR;16
,BGRA
,BGR
modes. - (Heif) - added
save_to_12bit
tooptions
, defaultFalse
. Determines to what bitness will be converted 16 bit images during saving.
Changed
- IMPORTANT!!!
10/12
bit images changed their byte order fromBig Endian
toLittle Endian
. Probably no one still use that API, but who knows... - (Heif) -
HeifFile.chroma
andHeifFile.color
properties was removed(they were not documented so probably no one will notice this), that info now stored inmode
. - (Heif, HeifImagePlugin) -
mode
for10
/12
bits was changed and accepts wider range of values, look here - Docs were
updated
&rewritten
to reflect all those changes.
Fixed
Examples
werefixed
&rewritten
(were broken from0.3.1
+ versions).exif
loading in HEIF sequence forPillow 9.2+
(python-pillow/Pillow#6335)
v0.3.2
Fixed
- Support of saving images with mode=
"1"
in"L"
mode. - Images with mode=
"L"
are now saved natively inMonochrome
mode(increase speed & decreased required memory and a bit less size) #26 - Speed optimization for
save
append_images
parameter - Possible
SEGFAULT
during encoding with somestride
values.
v0.3.1
Added
- (Heif) -
HeifFile
getsimages: List[HeifImage]
and alternative method of changing order of images by editing it. - (HeifImagePlugin) -
info
image dictionary can be now edited in place and it will be saved for image sequences.
Changed
- Updated docs.
Fixed
- (HeifImagePlugin) Again fixing image order, for Pillow plugin it was not fixed fully in 0.3.0.
- Optimizing code.
v0.3.0
Added
- (HeifImagePlugin, Heif) -
save
now recognizesexif=
andxmp=
optional parameters. Works as in other Pillow plugins. #25 - (HeifImagePlugin, Heif) -
save
now recognizesprimary_index
optional parameter. - (HeifImagePlugin, Heif) -
info["primary"]
value. - (Heif) -
primary_index
method toHeifFile
class. - Docs: Encoding
- Docs: Changes in Order Of Images
Changed
- Changed image order when multiply images present,
HeifFile
points to primary image as it was before, but it can be not the first image in a list. - When using as a Pillow's plugin the only way to know is an image
Primary
or not is to perform check ofinfo["primary"]
value. - (Heif) - optimized code of
HeifImageThumbnail
, addedget_original
method.
Fixed
- (HeifImagePlugin) -
save
bug, when first frame was saved instead of current. - Minor usage fixes and optimizations.