Pure python library to read and write jpeg format

亡梦爱人 提交于 2020-01-01 09:55:11

问题


guys! I'm looking for pure python implementation of jpeg writing (reading will be nice, but not necessary) library.
I've founded only TonyJPEG library port at http://mail.python.org/pipermail/image-sig/2004-November/003055.html
But the problem is this library doesn't support writing.

Any ideas?

UPD: I need to modify jpeg algorithm (starting from DCT) to make working prototype.

UPD2: The best decision for me was to port Jpeg library from the another language. I've chosen TonyJPEG library, because It's simplier than libJPEG.
If you need effective low-level access to JPEG in Python, the best choice is to port something like libJPEG or try to understand how tools like PIL works.


回答1:


I don't know of any libraries written in 100% python, however if you just need the library to work in python, then use PIL. It supports reading and writing many different imaging formats, including JPEG. Realistically, it should do everything you need it to do.




回答2:


If you want fairly low level access, you can use libjpeg through ctypes.
(NB: you didn't specify your working environment)



来源:https://stackoverflow.com/questions/5993836/pure-python-library-to-read-and-write-jpeg-format

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