mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 09:56:17 +03:00
Python Imaging Library (Fork)
456bd96565
PIL choked on perfectly valid BMP files (32 bits with Alpha). It could not handle valid RGBA masks to determine the raw format. To clarify things, I: - Rewrote the `BmpImagePlugin.BmpImageFile` class to be far more readable - Made error messages more explicit (e.g. say that RLE bitmaps are unsupported) - Made a readable dict to contain BMP header information - Kept the existing security checks - Instead of reading palette info by chunks of 3/4 bytes, read the whole palette info at once and parse the data. - Now works with BMPv4/5 with Alpha (and can be exported to alpha PNG for example) - Tested load and save with RGB24, RGB8, RGB8L, RGB32 and RGBA32. - Tested with one bogus file. File not accepted, as expected. I wanted to test more BMP formats, but I could not find that many images. But for all the types I tested, it worked flawlessly. |
||
---|---|---|
depends | ||
docs | ||
libImaging | ||
PIL | ||
Scripts | ||
Tests | ||
Tk | ||
_imaging.c | ||
_imagingcms.c | ||
_imagingft.c | ||
_imagingmath.c | ||
_imagingmorph.c | ||
_imagingtk.c | ||
_webp.c | ||
.coveragerc | ||
.gitattributes | ||
.gitignore | ||
.landscape.yaml | ||
.travis.yml | ||
build_children.sh | ||
CHANGES.rst | ||
CONTRIBUTING.md | ||
decode.c | ||
display.c | ||
encode.c | ||
Makefile | ||
MANIFEST.in | ||
map.c | ||
mp_compile.py | ||
outline.c | ||
path.c | ||
profile-installed.py | ||
py3.h | ||
README.rst | ||
RELEASING.md | ||
requirements.txt | ||
selftest.py | ||
setup.py | ||
test-installed.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. For more information, please `read the documentation <http://pillow.readthedocs.org/>`_, `check the changelog <https://github.com/python-pillow/Pillow/blob/master/CHANGES.rst>`_ and `find out how to contribute <https://github.com/python-pillow/Pillow/blob/master/CONTRIBUTING.md>`_. .. image:: https://travis-ci.org/python-pillow/Pillow.svg?branch=master :target: https://travis-ci.org/python-pillow/Pillow :alt: Travis CI build status .. image:: https://pypip.in/v/Pillow/badge.png :target: https://pypi.python.org/pypi/Pillow/ :alt: Latest PyPI version .. image:: https://pypip.in/d/Pillow/badge.png :target: https://pypi.python.org/pypi/Pillow/ :alt: Number of PyPI downloads .. image:: https://coveralls.io/repos/python-pillow/Pillow/badge.png?branch=master :target: https://coveralls.io/r/python-pillow/Pillow?branch=master :alt: Code coverage .. image:: https://landscape.io/github/python-pillow/Pillow/master/landscape.png :target: https://landscape.io/github/python-pillow/Pillow/master :alt: Code health