JPEG XR is a Microsoft developed format.
On Ubuntu 14.04, I installed
sudo apt-get install libjxr-dev
sudo apt-get install libjxr-tools
and now I can at least convert the *.jxr
files into other more friendly formats like bitmap or tif, with
JxrDecApp -i in.jxr -o output.bmp -c 0
or just using (ImageMagick)
convert in.jxr output.tif
However, Pillow still won't read the jxr image:
from PIL import Image
img = Image.open('in.jxr', 'rb')
gives IOError: cannot identify image file 'in.jxr'
.
(it has no problem with the out.tif
of course).
I rebuilt Pillow (with --no-cache-dir
after installing the libjxr-dev
lib too by the way).
I also tried using Wand, but despite the ImageMagick convert
command working, Wand won't read the file (possibly because ImageMagick just delegates this task to JxrDecApp anyway).
Finally, I tried imageio
, with im = imageio.imread('my.jxr')
, and it also failed to read the file.
Is there anyway I can process these JXR images in Pillow? Or any way at all in Python for that matter? I'm stuck calling convert with a subprocess at the moment..