问题
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