I would like to use the Python Pillow library to save 16 bit gray scale arrays in the jp2
("JPEG 2000") format.
I have hit a brick wall in trying to install the required library OpenJPEG on my Windows machine. The documentation is not very clear... but I assumed that I needed to download the Win64 binaries and simply put them on my path ( which I did).
That done, I am still getting the following error when using Pillow 4.0.0 in Anaconda 4.3.0 on Windows.
IOError: encoder jpeg2k not available
Anyone out there successfully used Pillow to write and read JPEG 2000 files, I would sure appreciate some tips.
Edit:
Here is the code that fails:
import PIL
import numpy as np
arr = np.ones(dtype=np.uint16, shape=(100, 100))
im = PIL.Image.fromarray(arr)
im.save('arr.jp2')