Python Imaging Library (Fork)
Go to file
Benjamin Gilbert 4d7372bfd0 Implement streamtype=1 option for tables-only JPEG encoding
We already support streamtype=2 to skip producing JPEG tables, but
streamtype=1, which skips everything but the tables, was never implemented.
The streamtype=1 stub code dates to Git pre-history, so it's not
immediately clear why.  Implement the missing support.

jpeg_write_tables() can't resume after a full output buffer (it fails with
JERR_CANT_SUSPEND), so it might seem that Pillow needs to pre-compute the
necessary buffer size.  However, in the normal case of producing an
interchange stream, the tables are written via the same libjpeg codepath
during the first jpeg_write_scanlines() call, and table writes aren't
resumable there either.  Thus, any buffer large enough for the normal case
will also be large enough for a tables-only file.

The streamtype option isn't documented and this commit doesn't change that.
It does add a test though.

Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2023-10-24 20:30:45 -05:00
_custom_build Add check-executables-have-shebangs to pre-commit and remove executable flags 2023-09-25 16:45:38 +03:00
.ci Install libopenblas-dev to fix installing NumPy on Linux PyPy 3.10 2023-09-17 22:40:42 +10:00
.github Skip non-wheel CI runs for tags 2023-10-15 20:46:25 +03:00
depends Updated libimagequant to 4.2.2 2023-10-14 11:56:23 +11:00
docs Use "gray" more consistently 2023-10-19 19:12:01 +11:00
src Implement streamtype=1 option for tables-only JPEG encoding 2023-10-24 20:30:45 -05:00
Tests Implement streamtype=1 option for tables-only JPEG encoding 2023-10-24 20:30:45 -05:00
wheels Updated libjpeg-turbo to 3.0.1 2023-10-17 07:51:56 +11:00
winbuild Updated libjpeg-turbo to 3.0.1 2023-10-17 07:51:56 +11:00
.appveyor.yml Re-remove --ssl-no-revoke 2023-09-21 12:20:17 +03:00
.clang-format Adjust clang-format style 2021-01-03 14:16:42 +11:00
.coveragerc Removed unnecessary line 2020-01-03 16:40:31 +11:00
.editorconfig Move and delete files for merging into main repository 2023-09-24 22:34:13 +10:00
.gitattributes Set EPS test files as binary 2018-12-29 21:53:07 -08:00
.gitignore Move and delete files for merging into main repository 2023-09-24 22:34:13 +10:00
.gitmodules Updated wheel build process for new location 2023-09-24 22:51:42 +10:00
.pre-commit-config.yaml [pre-commit.ci] pre-commit autoupdate 2023-10-02 20:02:53 +00:00
.readthedocs.yml Build only PDF in addition to default html 2023-05-15 15:47:30 +03:00
.travis.yml Allow custom builds to be triggered in Travis CI 2023-10-07 23:49:35 +11:00
CHANGES.rst Use "gray" more consistently 2023-10-19 19:12:01 +11:00
codecov.yml Restored 32-bit support 2023-06-27 14:43:58 +10:00
conftest.py Declare helper as a pytest plugin so asserts aren't ignored with PYTHONOPTIMIZE 2020-02-02 12:26:01 +02:00
LICENSE Update HPND wording in LICENSE file 2023-02-09 23:23:29 +01:00
Makefile Removed inplace target 2023-05-20 15:38:53 +10:00
MANIFEST.in Updated wheel build process for new location 2023-09-24 22:51:42 +10:00
pyproject.toml Remove redundant wheel dep from pyproject.toml 2023-07-02 04:13:02 +02:00
README.md Updated redirected links 2023-10-07 23:08:02 +11:00
RELEASING.md Update release checklist: macOS/Linux artifact is called 'wheels' 2023-10-15 20:08:48 +03:00
selftest.py Remove redundant parentheses 2022-04-10 23:39:54 +03:00
setup.cfg Add support for Python 3.12 2023-07-12 16:31:45 +03:00
setup.py Increment Python version check to support Python 3.12 2023-07-13 17:21:06 +10:00
tox.ini Add support for Python 3.12 2023-07-12 16:31:45 +03:00

Pillow logo

Pillow

Python Imaging Library (Fork)

Pillow is the friendly PIL fork by Jeffrey A. Clark (Alex) and contributors. PIL is the Python Imaging Library by Fredrik Lundh and Contributors. As of 2019, Pillow development is supported by Tidelift.

docs Documentation Status
tests GitHub Actions build status (Lint) GitHub Actions build status (Test Linux and macOS) GitHub Actions build status (Test Windows) GitHub Actions build status (Test MinGW) GitHub Actions build status (Test Cygwin) GitHub Actions build status (Test Docker) AppVeyor CI build status (Windows) GitHub Actions build status (Wheels) Travis CI wheels build status (aarch64) Code coverage Fuzzing Status
package Zenodo Tidelift Newest PyPI version Number of PyPI downloads OpenSSF Best Practices
social Join the chat at https://gitter.im/python-pillow/Pillow Follow on https://twitter.com/PythonPillow Follow on https://fosstodon.org/@pillow

Overview

The Python Imaging Library adds image processing capabilities to your Python interpreter.

This library provides extensive file format support, an efficient internal representation, and fairly powerful image processing capabilities.

The core image library is designed for fast access to data stored in a few basic pixel formats. It should provide a solid foundation for a general image processing tool.

More Information

Report a Vulnerability

To report a security vulnerability, please follow the procedure described in the Tidelift security policy.