Skip to content

Releases: bigcat88/pillow_heif

v0.7.1

28 Oct 15:22
5e27583
Compare
Choose a tag to compare

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 to HeifFile class.
  • (Heif) RGBA;16 -> RGBA conversion.
  • (Heif) RGBa -> RGB conversion.

Changed

  • libaom updated from 3.4.0 to 3.5.0 version. changelog
  • libde265 updated from 1.0.8 to 1.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 in 0.8.0.
  • (Heif) check_heiffunction marked as deprecated.

Fixed

  • (Heif) convert_to should do nothing if the target mode 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 for RGBA mode during saving instead of throwing KeyError exception.

v0.7.0

11 Sep 19:50
9ad6dfe
Compare
Choose a tag to compare

This release is fully compatible with previous versions.

Changed

  • libheif updated to version 1.13.0
  • License for project itself changed to Apache 2.0

v0.6.1

20 Aug 21:12
baa6bad
Compare
Choose a tag to compare

This release contains security and bug fixes.

Changed

  • Speed boost for AVIF encoding(+50%). commit

Fixed

v0.6.0

05 Aug 20:31
9035087
Compare
Choose a tag to compare

This release is fully compatible with previous versions if you was not using AVIF decoding before.

Added

  • (Heif) save method accepts optional parameter format. If format="AVIF" output file will be encoded in h264 format using AOM.
  • AvifImagePlugin introduced. Usage: register_avif_opener() or import 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, register AvifImagePlugin if you need that. If you use pillow_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

30 Jul 17:51
c4ec1cd
Compare
Choose a tag to compare

This release is fully compatible with 0.5.0 version.

Added

  • chroma=4xx optional subsampling parameter for save. Equivalent to enc_params=[("chroma", "4xx")] in old versions.

Changed

  • enc_params for save changed type from List[Tuple[str, str]] to Dict. Old code will still work, but marked as deprecated.
  • libheif_info now returns also bundled versions of x265 and aom.
  • options().avif marked as deprecated. Starting from 0.6.0 version to register an AVIF plugin there will be a separate function and it will be disabled by default.
  • options().hevc_enc marked as deprecated and will be removed in 0.6.0.

Fixed

  • Rare situation when exif orientation is 1 and xmp orientation different from 1 present at same time.
  • XMP tags orientation that are generated by exiftool in some cases.
  • Updated libaom on Linux and Windows from 3.3.0 to 3.4.0 version. MacOS builds had already that version in 0.5.0.
  • Pillow plugin now does not register save methods for HEIF format if build does not contains HEIF encoder(for custom builds from source).
  • Slightly speed optimizations for working in a Pillow plugin mode.

v0.5.0

21 Jul 18:29
61f7258
Compare
Choose a tag to compare

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 to HeifFile
  • convert_to method to HeifFile

Changed

  • Wheels now are in ABI3 format for CPython(cp3x-abi3-xxx.whl), 3x less size on PyPi.
  • (Heif) to_pillow method, now fills metadata from an original image if was called for thumbnails.
  • (HeifImagePlugin) During open current frame in multi frame images are set to index of Primary Image.
  • (Heif) add_thumbnails method moved from HeifFile/HeifImage to separate file and now can accept a PIL Image.

Fixed

  • (HeifImagePlugin) Nice speed up for reading images having thumbnails in a Pillow plugin mode.
  • (HeifImagePlugin) XMP metadata save from TIFF and JPEG.
  • (HeifImagePlugin) EXIF metadata save from TIFF(only for Pillow >= 9.2).
  • (HeifImagePlugin) - Not to change index of a current frame during saving multi frame images.

v0.4.0

04 Jul 00:20
10b49d0
Compare
Choose a tag to compare

Added

  • (Heif) - Numpy array interface support.
  • (Heif) - add_from_bytes method and from_bytes function added. Allows to read 16-bit color images with OpenCV(or any other library) and save it as 10(12) bit HEIF.
  • (Heif) - convert_to method to HeifImage to provide an easy way to open 10 or 12 bit images as 16 bit for OpenCV(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 to options, default False. Determines to what bitness will be converted 16 bit images during saving.

Changed

  • IMPORTANT!!! 10/12 bit images changed their byte order from Big Endian to Little Endian. Probably no one still use that API, but who knows...
  • (Heif) - HeifFile.chroma and HeifFile.color properties was removed(they were not documented so probably no one will notice this), that info now stored in mode.
  • (Heif, HeifImagePlugin) - mode for 10/12 bits was changed and accepts wider range of values, look here
  • Docs were updated & rewritten to reflect all those changes.

Fixed

  • Examples were fixed & rewritten(were broken from 0.3.1+ versions).
  • exif loading in HEIF sequence for Pillow 9.2+ (python-pillow/Pillow#6335)

v0.3.2

25 Jun 12:01
9d20451
Compare
Choose a tag to compare

Fixed

  • Support of saving images with mode="1" in "L" mode.
  • Images with mode="L" are now saved natively in Monochrome mode(increase speed & decreased required memory and a bit less size) #26
  • Speed optimization for save append_images parameter
  • Possible SEGFAULT during encoding with some stride values.

v0.3.1

17 Jun 14:20
3aacb3d
Compare
Choose a tag to compare

Added

  • (Heif) - HeifFile gets images: 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

11 Jun 01:34
c2feaa2
Compare
Choose a tag to compare

Added

  • (HeifImagePlugin, Heif) - save now recognizes exif= and xmp= optional parameters. Works as in other Pillow plugins. #25
  • (HeifImagePlugin, Heif) - save now recognizes primary_index optional parameter.
  • (HeifImagePlugin, Heif) - info["primary"] value.
  • (Heif) - primary_index method to HeifFile 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 of info["primary"] value.
  • (Heif) - optimized code of HeifImageThumbnail, added get_original method.

Fixed

  • (HeifImagePlugin) - save bug, when first frame was saved instead of current.
  • Minor usage fixes and optimizations.