How to decode JPEG XR files in memory using Python?

一曲冷凌霜 提交于 2019-12-11 03:45:45

问题


I'm using Python 3 to process a file produced by microscope, which is essentially a collection of thousands of Jpeg XR compressed images. I need to read all of them into memory. Now I'm reading data in binary mode, saving them in .jxr file and call JxrDecApp.exe to convert it to tiff and read it back to memory. This apparently is a major bottleneck to performance because it involves a lot of file read and write.

From what I gather, ImageMagick also delegates this task to JxrDecApp.exe. So using wand wouldn't help, either. Am I right?

Then I'm wondering if there is any way to decode Jpeg XR in memory using Python?

Thanks !


回答1:


imageio?

It supports JPEG XR, and can read from can read from filenames, file objects, http, zipfiles, bytes, webcams.



来源:https://stackoverflow.com/questions/32038280/how-to-decode-jpeg-xr-files-in-memory-using-python

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!