Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pure python library to read and write jpeg format

Tags:

python

jpeg

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.

like image 590
Vladimir Protasov Avatar asked May 13 '11 15:05

Vladimir Protasov


People also ask

How do I open a JPG file in Python?

Image. open() Opens and identifies the given image file.

Can Python read image?

Using ImageIO : Imageio is a Python library that provides an easy interface to read and write a wide range of image data, including animated images, video, volumetric data, and scientific formats. It is cross-platform, runs on Python 3.7+, and is easy to install.


1 Answers

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.

like image 102
riwalk Avatar answered Oct 26 '22 04:10

riwalk