semvec/pypi-packages huggingface dataset:
pillow-snippet 0.0.4
some useful snippet for image

# pillow_snippet
some useful snippet and utils using pillow to handle image

# Requirements
* Pillow

# Install
```
pip install pillow-snippet
```

# Documentation
## Tutorial
* origin image  
![originimage](./colorful_example.png)
* origin image2  
![originimage2](./colorful_image.png)
* convert an Image to a circled Image
```
from pillow_snippet import convert
origin_image = Image.open('colorful_example.png')
image = origin_image.resize((200, 200))
circle_image = convert.circle_image(image)
circle_image.save("test_result/circle_image.png")
```
![circle-image](./test_result/circle_image.png)

* delete the white pixel from an image  
    **it seems there is still white but if fact it is transparent. You can open the image in new tab to see more details**
```
mask = Mask(image)
exclude_white_image = mask.get_exclude_white_image(tolerance=8)
exclude_white_image.save("test_result/exclude_white_image.png")
```
![no white image](./test_result/exclude_white_image.png)

* convert the image to only contains red color according it's brightness
```
mask = Mask(image)
change_to_red_image = mask.convert_to_single_color("#ff0000ff")
change_to_red_image.save("test_result/change_to_red_image.png")
```
![only red image](./test_result/change_to_red_image.png)

* convert the imge to only contains green color according it's opacity instead of it's brightness
```
mask2 = Mask(origin_image2)
change_to_green_image = mask2.convert_to_single_color("#00ff00ff", mode="L")
change_to_green_image.save("test_result/change_to_green_image_L.png")
change_to_green_image = mask2.convert_to_single_color("#00ff00ff", mode="opacity")
change_to_green_image.save("test_result/change_to_green_image_opacity.png")
```
compare difference mode  
    * mode = "L"  
    ![img](./test_result/change_to_green_image_L.png)
    * mode = "opacity"  
    ![img](./test_result/change_to_green_image_opacity.png)



# Contribution
1. clone the code
2. make your commit
3. make test
```
sudo pip install .
python3 test.py
```
4. create a pull request
tendril-dox-labelmaker 0.2.1
Label generation infrastructure for tendril
Requires Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
Keywords: tendril


.. image:: https://img.shields.io/pypi/v/tendril-dox-labelmaker.svg?logo=pypi
    :target: https://pypi.org/project/tendril-dox-labelmaker

.. image:: https://img.shields.io/pypi/pyversions/tendril-dox-labelmaker.svg?logo=pypi
    :target: https://pypi.org/project/tendril-dox-labelmaker

.. image:: https://img.shields.io/travis/tendril-framework/tendril-dox-labelmaker.svg?logo=travis
    :target: https://travis-ci.org/tendril-framework/tendril-dox-labelmaker

.. image:: https://img.shields.io/coveralls/github/tendril-framework/tendril-dox-labelmaker.svg?logo=coveralls
    :target: https://coveralls.io/github/tendril-framework/tendril-dox-labelmaker

.. image:: https://img.shields.io/codacy/grade/88fe2cf2504248c7bc5d25600dea47bc?logo=codacy
    :target: https://www.codacy.com/app/chintal/tendril-dox-labelmaker

.. image:: https://img.shields.io/requires/github/tendril-framework/tendril-dox-labelmaker.svg
    :target: https://requires.io/github/tendril-framework/tendril-dox-labelmaker/requirements

.. image:: https://img.shields.io/pypi/l/tendril-dox-labelmaker.svg
    :target: https://www.gnu.org/licenses/agpl-3.0.en.html



.. inclusion-marker-do-not-remove

Introduction
------------

TODO Some brief introduction


Package Information
-------------------

The latest version of the documentation, including installation, usage, and
API/developer notes can be found at
`ReadTheDocs <https://tendril-dox-labelmaker.readthedocs.io/en/latest/index.html>`_.

The latest version of the sources can be found at
`GitHub <https://github.com/tendril-framework/tendril-dox-labelmaker>`_. Please use 
GitHub's features to report bugs, request features, or submit pull/merge requests.

The principle author for ``tendril-dox-labelmaker`` is Chintalagiri Shashank. The 
author can be contacted if necessary via the information on the
`author's github profile <https://github.com/chintal>`_ . See the AUTHORS file
for a full list of collaborators and/or contributing authors, if any.

``tendril-dox-labelmaker`` is distributed under the terms of the
`AGPLv3 license <https://www.gnu.org/licenses/agpl-3.0.en.html>`_ .
A copy of the text of the license is included along with the sources.
tendril-dox-render 0.2.0
Core document rendering primitives for tendril
Requires Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
Keywords: tendril


.. image:: https://img.shields.io/pypi/v/tendril-dox-render.svg?logo=pypi
    :target: https://pypi.org/project/tendril-dox-render

.. image:: https://img.shields.io/pypi/pyversions/tendril-dox-render.svg?logo=pypi
    :target: https://pypi.org/project/tendril-dox-render

.. image:: https://img.shields.io/travis/tendril-framework/tendril-dox-render.svg?logo=travis
    :target: https://travis-ci.org/tendril-framework/tendril-dox-render

.. image:: https://img.shields.io/coveralls/github/tendril-framework/tendril-dox-render.svg?logo=coveralls
    :target: https://coveralls.io/github/tendril-framework/tendril-dox-render

.. image:: https://img.shields.io/codacy/grade/e37ae12294f64aab96aef44bdea1e640?logo=codacy
    :target: https://www.codacy.com/app/chintal/tendril-dox-render

.. image:: https://img.shields.io/requires/github/tendril-framework/tendril-dox-render.svg
    :target: https://requires.io/github/tendril-framework/tendril-dox-render/requirements

.. image:: https://img.shields.io/pypi/l/tendril-dox-render.svg
    :target: https://www.gnu.org/licenses/agpl-3.0.en.html



.. inclusion-marker-do-not-remove

Introduction
------------

TODO Some brief introduction


Package Information
-------------------

The latest version of the documentation, including installation, usage, and
API/developer notes can be found at
`ReadTheDocs <https://tendril-dox-render.readthedocs.io/en/latest/index.html>`_.

The latest version of the sources can be found at
`GitHub <https://github.com/tendril-framework/tendril-dox-render>`_. Please use 
GitHub's features to report bugs, request features, or submit pull/merge requests.

The principle author for ``tendril-dox-render`` is Chintalagiri Shashank. The 
author can be contacted if necessary via the information on the
`author's github profile <https://github.com/chintal>`_ . See the AUTHORS file
for a full list of collaborators and/or contributing authors, if any.

``tendril-dox-render`` is distributed under the terms of the
`AGPLv3 license <https://www.gnu.org/licenses/agpl-3.0.en.html>`_ .
A copy of the text of the license is included along with the sources.