imagecodecs
imagecodecs copied to clipboard
Use libjpeg-turbo for all Lossless JPEG bit depths
Enabled by the solution to https://github.com/libjpeg-turbo/libjpeg-turbo/issues/768 (Planned to be included in libjpeg-turbo release 3.1.0.)
There are still some Lossless JPEG encoded images that libjpeg-turbo refuses to decode, see the discussions in:
- https://github.com/libjpeg-turbo/libjpeg-turbo/issues/586
- https://github.com/libjpeg-turbo/libjpeg-turbo/issues/765
Note to self while testing with local copy of libjpeg-turbo:
Put this in the customize_build
function used by setup.py
:
libjpeg_turbo_path = <path to libjpeg-turbo>
EXTENSIONS['jpeg8']['sources'] = []
EXTENSIONS['jpeg8']['include_dirs'] = [libjpeg_turbo_path + "/src"] # moved to src in the dev branch
EXTENSIONS['jpeg8']['library_dirs'] = [libjpeg_turbo_path]
and make sure to set
export LD_LIBRARY_PATH=<libjpeg_turbo_path>
before running any python script importing imagecodecs.