Code Monkey home page Code Monkey logo

Comments (10)

cgohlke avatar cgohlke commented on June 15, 2024

HEIF is on the horizon:

# 'heif': [], # LGPL

# 'heif': ext(libraries=['heif']),

I am trying to avoid LGPL licensed dependencies, which prevent to distribute static builds. I have not seen much use/traction of HEIF in other container formats (TIFF, zarr) and scientific imaging when compared to for example JPEG XL. What is your use case?

from imagecodecs.

John-P avatar John-P commented on June 15, 2024

Thanks, that's great. I am interested in experimenting with use in TIFF or zarr. I find AVIF quite slow to encode, at least on my machines, and was interested in HEVC as I have read that the support for hardware acceleration is better. I also found JPEG XL quite slow through imagecodecs despite the cloudinary blogs and white paper showing good performance. I see that the new effort and distance kwargs have been added since I last looked though, which may be useful to tune the performance.

from imagecodecs.

cgohlke avatar cgohlke commented on June 15, 2024

It looks like the HEIF encoder in libheif depends on the x265 HEVC Encoder library, which is GPL, not LGPL licensed. It cannot be distributed with imagecodecs binaries. Bummer.

Libjxl is still changing quite a bit and performance is probably improving. JXL has already made it into TIFF (via GDAL, tifffile, and the next release of libtiff).

from imagecodecs.

John-P avatar John-P commented on June 15, 2024

On the plus side, it looks like the libde265 library is LGPL. It may also be useful to have the intra-frame coding alone without the HEIF wrapper.

from imagecodecs.

cgohlke avatar cgohlke commented on June 15, 2024

libde265 is decode only, at least for Debian's libde265-dev, no? Due to possible patent and license issues, I'll release the HEIF codec as source only.

from imagecodecs.

John-P avatar John-P commented on June 15, 2024

Ah yes it does appear to be decode only, that is unfortunate. I did also stumble across this library with is BSD licensed https://github.com/ultravideo/kvazaar but I am also unsure of the patent and licensing issues.

from imagecodecs.

John-P avatar John-P commented on June 15, 2024

RE patents. It looks like royalties are paid based on the devices sold to end users with the first 100,000 devices/year paying no royalty for essential patents. Not sure how that works of a software package though. There is a summary here: https://www.mpegla.com/wp-content/uploads/HEVCweb.pdf

from imagecodecs.

cgohlke avatar cgohlke commented on June 15, 2024

More discouraging news besides patents and GPL:

  • it seems x265 can be compiled for either 8-bit or 10-bit but not both -> heif_encode can either handle uint8 or uint16 input. Workaround is to provide two codecs, heif8 and heif10.
  • libheif does not support sequences/tracks or bursts, only top level images -> no inter-frame coding.
  • I could not find a way to determine if an image was originally monochrome -> monochrome roundtrips fail.
  • lossless mode is not lossless.

I'll probably include the heif codec source code with the next release, but not provide binaries or further support unless something fundamentally improves.

from imagecodecs.

John-P avatar John-P commented on June 15, 2024

Thanks for the update. That is a shame. Happy to test out using the codec from source if you need a guinnea pig though.

from imagecodecs.

cgohlke avatar cgohlke commented on June 15, 2024

A HEIF codec (source code only) is in v2022.7.27.

from imagecodecs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.