mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 17:24:31 +03:00
Python Imaging Library (Fork)
add2746ac6
On truncated jpeg, decoder can suspend waiting for additional bytes in buffer. For some input files, decoder suspends on jpeg_start_decompress stage. If at this point file reader reaches EOF, py code never gets back to jpeg decoder and we end up with no bytes to result image. This leaves us with some amount of potentially useful bytes undecoded and thrown away. Libjpeg docs suggest that in such situation, more appropriate would be to add EOI marker to the end of buffer, which will allows decoder to finish. https://github.com/libjpeg-turbo/libjpeg-turbo/blob/0dd9a2c1fd6c/libjpeg.txt#L1803-L1809 Docs also mention that adding EOI markers is what non-suspending code does anyway. |
||
---|---|---|
.github | ||
.travis | ||
depends | ||
docs | ||
src | ||
Tests | ||
winbuild | ||
.codecov.yml | ||
.coveragerc | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
.landscape.yaml | ||
.travis.yml | ||
appveyor.yml | ||
build_children.sh | ||
CHANGES.rst | ||
LICENSE | ||
Makefile | ||
MANIFEST.in | ||
mp_compile.py | ||
README.rst | ||
RELEASING.md | ||
requirements.txt | ||
selftest.py | ||
setup.cfg | ||
setup.py | ||
tox.ini |
Pillow ====== Python Imaging Library (Fork) ----------------------------- Pillow is the friendly PIL fork by `Alex Clark and Contributors <https://github.com/python-pillow/Pillow/graphs/contributors>`_. PIL is the Python Imaging Library by Fredrik Lundh and Contributors. .. start-badges .. list-table:: :stub-columns: 1 * - docs - |docs| * - tests - | |linux| |macos| |windows| |coverage| * - package - |zenodo| |version| * - social - |gitter| |twitter| .. |docs| image:: https://readthedocs.org/projects/pillow/badge/?version=latest :target: https://pillow.readthedocs.io/?badge=latest :alt: Documentation Status .. |linux| image:: https://img.shields.io/travis/python-pillow/Pillow/master.svg?label=Linux%20build :target: https://travis-ci.org/python-pillow/Pillow :alt: Travis CI build status (Linux) .. |macos| image:: https://img.shields.io/travis/python-pillow/pillow-wheels/latest.svg?label=macOS%20build :target: https://travis-ci.org/python-pillow/pillow-wheels :alt: Travis CI build status (macOS) .. |windows| image:: https://img.shields.io/appveyor/ci/python-pillow/Pillow/master.svg?label=Windows%20build :target: https://ci.appveyor.com/project/python-pillow/Pillow :alt: AppVeyor CI build status (Windows) .. |coverage| image:: https://coveralls.io/repos/python-pillow/Pillow/badge.svg?branch=master&service=github :target: https://coveralls.io/github/python-pillow/Pillow?branch=master :alt: Code coverage .. |zenodo| image:: https://zenodo.org/badge/17549/python-pillow/Pillow.svg :target: https://zenodo.org/badge/latestdoi/17549/python-pillow/Pillow .. |version| image:: https://img.shields.io/pypi/v/pillow.svg :target: https://pypi.python.org/pypi/Pillow/ :alt: Latest PyPI version .. |gitter| image:: https://badges.gitter.im/python-pillow/Pillow.svg :target: https://gitter.im/python-pillow/Pillow?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge :alt: Join the chat at https://gitter.im/python-pillow/Pillow .. |twitter| image:: https://img.shields.io/badge/tweet-on%20Twitter-00aced.svg :target: https://twitter.com/PythonPillow :alt: Follow on https://twitter.com/PythonPillow .. end-badges More Information ---------------- - `Documentation <https://pillow.readthedocs.io/>`_ - `Installation <https://pillow.readthedocs.io/en/latest/installation.html>`_ - `Handbook <https://pillow.readthedocs.io/en/latest/handbook/index.html>`_ - `Contribute <https://github.com/python-pillow/Pillow/blob/master/.github/CONTRIBUTING.md>`_ - `Issues <https://github.com/python-pillow/Pillow/issues>`_ - `Pull requests <https://github.com/python-pillow/Pillow/pulls>`_ - `Changelog <https://github.com/python-pillow/Pillow/blob/master/CHANGES.rst>`_ - `Pre-fork <https://github.com/python-pillow/Pillow/blob/master/CHANGES.rst#pre-fork>`_