<commit_before>.. image:: https://travis-ci.org/wagtail/Willow.svg?branch=master
    :target: https://travis-ci.org/wagtail/Willow

.. image:: http://drone4.kaed.uk/api/badges/torchbox/Willow/status.svg
    :target: http://drone4.kaed.uk/torchbox/Willow

Willow image library
====================

A wrapper that combines the functionality of multiple Python image libraries into one API.

`Documentation <http://willow.readthedocs.org/en/latest/index.html>`_

Overview
--------

Willow is a simple image library that combines the APIs of Pillow, Wand and OpenCV. It converts the image between the libraries when necessary.

Willow currently has basic resize and crop operations, face and feature detection and animated GIF support. New operations and library integrations can also be `easily implemented <http://willow.readthedocs.org/en/latest/guide/extend.html>`_.

It is written in pure-Python (versions 2.7, 3.3, 3.4, 3.5 and 3.6 are supported)

Examples
--------

Resizing an image
`````````````````

.. code-block:: python

   from willow.image import Image

   f = open('test.png', 'rb')<commit_msg>add links to Pillow, Wand and OpenCV<commit_after>.. image:: https://travis-ci.org/wagtail/Willow.svg?branch=master
    :target: https://travis-ci.org/wagtail/Willow

.. image:: http://drone4.kaed.uk/api/badges/torchbox/Willow/status.svg
    :target: http://drone4.kaed.uk/torchbox/Willow

Willow image library
====================

A wrapper that combines the functionality of multiple Python image libraries into one API.

`Documentation <http://willow.readthedocs.org/en/latest/index.html>`_

Overview
--------

Willow is a simple image library that combines the APIs of `Pillow <https://pillow.readthedocs.io/>`_, `Wand <http://docs.wand-py.org>`_ and `OpenCV <https://opencv.org/>`_. It converts the image between the libraries when necessary.

Willow currently has basic resize and crop operations, face and feature detection and animated GIF support. New operations and library integrations can also be `easily implemented <http://willow.readthedocs.org/en/latest/guide/extend.html>`_.

It is written in pure-Python (versions 2.7, 3.3, 3.4, 3.5 and 3.6 are supported)

Examples
--------

Resizing an image
`````````````````

.. code-block:: python

   from willow.image import Image

   f = open('test.png', 'rb')
{'fraction_non_alphanumeric': 0.15298667812634292, 'fraction_numerical': 0.010313708637730984, 'mean_word_length': 3.9743589743589745, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4568145', 'n_tokens_mistral': 772, 'n_tokens_neox': 724, 'n_words': 222}