Python Imaging Library (Fork)
Go to file
artscoop 456bd96565 Fix 32-bit BMP loading (RGBA or RGBX)
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.
2015-03-04 18:15:56 +01:00
depends Make OpenJPEG with 4 job slots - ~2.2 times faster (take 2) 2014-08-21 14:50:11 +03:00
docs DOC document compress_level Image.save PNG option. 2015-01-15 23:14:30 +05:00
libImaging Merge pull request #1088 from bgilbert/opaque-RGBa 2015-02-05 22:32:58 -08:00
PIL Fix 32-bit BMP loading (RGBA or RGBX) 2015-03-04 18:15:56 +01:00
Scripts Extract __main__ section of PIL/ImageFont.py into Scripts/createfontdatachunk.py 2014-07-07 22:31:20 +03:00
Tests Merge pull request #1121 from radarhere/endian 2015-03-02 10:43:27 +02:00
Tk Update 2014-06-22 20:49:42 -04:00
_imaging.c Version Bump --2.7.0 2014-12-31 20:42:57 -08:00
_imagingcms.c Added profile.tobytes() for ImageCms Profiles 2014-07-29 20:44:17 -07:00
_imagingft.c rearranged comments 2015-01-07 21:38:36 -08:00
_imagingmath.c Cleanup WS, courtesy of @Arfrever 2013-06-30 18:42:19 -04:00
_imagingmorph.c Fix segfault when importing _imagingmorph 2014-06-24 19:06:05 -07:00
_imagingtk.c Cleanup WS, courtesy of @Arfrever 2013-06-30 18:42:19 -04:00
_webp.c webp: better error checking when using Mux API 2015-02-23 11:10:37 +01:00
.coveragerc Don't exclude Windows code 2014-07-05 21:32:09 +03:00
.gitattributes Add git attributes file for *.ppm, fixes #92 2013-03-10 08:28:15 -04:00
.gitignore Activated MPO detection. 2014-07-17 12:30:45 -04:00
.landscape.yaml Add Landscape config and badge 2014-10-01 14:46:32 +03:00
.travis.yml Re-encrypt AUTH-TOKEN inside python-pillow/Pillow 2015-01-04 22:01:32 +02:00
build_children.sh Fix repo name in curl 2015-01-04 21:30:50 +02:00
CHANGES.rst Update CHANGES.rst [CI skip] 2015-03-02 10:45:33 +02:00
CONTRIBUTING.md Fork from master and send pull requests to master 2014-11-06 13:01:42 +02:00
decode.c Added the JPEG2000 memory leak fix to decode.c 2014-09-12 22:09:26 -07:00
display.c Clean up defines and includes for Windows 2014-05-09 21:05:30 +02:00
encode.c Memory Leak, missing Py_DECREF 2014-09-24 15:46:34 -07:00
Makefile Doc targets + help for makefile 2014-07-14 21:02:12 -07:00
MANIFEST.in Remove Sane from manifest, add .msp 2014-11-07 16:25:02 -08:00
map.c Clean up defines and includes for Windows 2014-05-09 21:05:30 +02:00
mp_compile.py Limit default MAX_CONCURRENCY to 4. 2014-12-08 22:20:22 +03:00
outline.c py3k: Remove ancient Python hacks 2013-01-10 08:46:57 -06:00
path.c Cleanup WS, courtesy of @Arfrever 2013-06-30 18:42:19 -04:00
profile-installed.py flake8 2014-08-28 14:44:19 +03:00
py3.h Update py3.h 2013-03-13 19:34:43 -07:00
README.rst Add Landscape config and badge 2014-10-01 14:46:32 +03:00
RELEASING.md Update Releasing.md [ci skip] 2014-10-02 10:10:58 -07:00
requirements.txt Add self; make note about reqs 2014-06-28 16:20:12 -04:00
selftest.py Update selftest.py for hopper 2014-09-04 09:50:47 +03:00
setup.py Turn off zip-safe flag for debug builds 2015-01-20 15:00:58 -08:00
test-installed.py flake8 2014-08-28 14:44:19 +03:00
tox.ini Added clean/build to tox to make it behave like travis 2013-07-08 23:10:21 -04:00

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