Skip to content

Releases: bigcat88/pillow_heif

v0.4.0

04 Jul 00:20
10b49d0

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

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

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

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.

v0.2.5

30 May 12:30
7aabeb2

Choose a tag to compare

Added

  • (HeifImagePlugin) - support for PIL.ImageFile.LOAD_TRUNCATED_IMAGES flag.
  • (Windows, encoder) - encoding of 10 and 12 bit images. #24

Changed

  • (Windows) - replaced vcpkg build by MSYS2(MinGW) build, report of any possible bugs you see.

v0.2.1

23 Jan 18:46
5ce3038

Choose a tag to compare

Added

  • (Windows) Build script by default assumes that libheif installed in C:\vcpkg\installed\x64-windows, if VCPKG_PREFIX environment is missing.
  • (Heif) reader_add_thumbnail and reader_remove_image examples.
  • (Heif) to_pillow method and adjusted examples to use it.

Changed

  • (Heif) Removed HeifSaveMask, get_img_thumb_mask_for_save that was previously introduced, instead added __delitem__ to HeifFile.
  • All thumbnails encoding features reworked, to simplify api. See add_thumbnails methods in HeifFile and HeifImage classes.

Fixed

  • (HeifImagePlugin) Fixed palette images with bytes transparency conversion. #21 (@Jarikf)
  • (Heif) Raises ValueError when trying to save empty(no images) file.
  • (HeifImagePlugin) Skips images with sizes = 0 during save, if there is no images, raise ValueError.
  • (HeifImagePlugin) Memory optimizations, when there is only one image in file.
  • Added licenses for libraries in binary wheels.
  • (Windows) Fix docs for building and developing.
  • (Heif) add_from_pillow method, now adds thumbnails from Pillow if it is HeifImageFile(ImageFile.ImageFile) class.

v0.1.7

23 Jan 18:45
f1e683c

Choose a tag to compare

Added

  • Added manylinux2014_i686 wheels.
  • Integration of PEP 517 in progress, added new instructions for building from source.

Changed

  • Making code cleaner, renamed cffi module from pillow_heif.libheif to _pillow_heif_cffi.
  • libaom bumped from 3.2.0 to 3.3.0

Fixed

  • Fixed AttributeError when calling Image.verify. Thanks @zijian-hu for reporting.

v0.1.4

23 Jan 18:44
b6ff992

Choose a tag to compare

First normal working release.

Added

  • Python 3.10 wheels.
  • Added libaom library to linux build.
  • More tests.

Changed

  • Code refactoring, readme update.

Fixed

  • Bug with header check when used as plugin for Pillow with as_opener function. Thanks for this to @DimonLavron