python-imaging/Pillow — pull request #677 by csinchok (2014-05-28 22:47:41+00:00)
Title: Allow saving to JPEG with an explicit qtables value

Currently, a `TypeError` is thrown when trying to save a JPEG with an explicit qtables value. From looking at the code, calls like this are OK:

```python

im.save("/tmp/image.jpg", qtables="web_low", subsampling="web_high")
im.save("/tmp/image.jpg", qtables="web_low", subsampling="4:1:1")
im.save("/tmp/image.jpg", qtables="keep", subsampling="4:1:1")
```

I'd like to be able to specify exact qtables and subsampling values, so I've attached some code that will allow this.

Additionally the `qtables`, and `subsampling` parameters are undocumented, as is the `"keep"` value for the `quality` parameter. I'd be happy to add this documentation—I assume that should be added to the `JPEG` section of the appendix?