Skip to content

Commit

Permalink
Documentation updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Tathorack committed Jan 14, 2018
1 parent 2d8e2cf commit aa5fa8c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
21 changes: 13 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ imagecolor - Extract colors from images
.. |license| image:: https://img.shields.io/pypi/l/imagecolor.svg
:target: https://github.com/Tathorack/imagecolor/blob/master/LICENSE.rst

imagecolor is a python module for averaging images using pillow_. To speed up processing of multiple images it uses concurrent.futures_ to bipass the GIL by spawning worker processes.
imagecolor is a python module for averaging images using pillow_. When processing of multiple images it uses concurrent.futures_ for multiprocessing.

.. _pillow: http://pillow.readthedocs.io/
.. _concurrent.futures: https://docs.python.org/3/library/concurrent.futures.html
Expand Down Expand Up @@ -60,32 +60,37 @@ To use imagecolor import it with ::

average an image
----------------
Average a single image file to a dict with ``red``, ``green``, & ``blue`` keys along with the file name as ``name``
Average a single image file to a dict containing ``name``, ``red``, ``green``, & ``blue``
::

imagecolor.file_average(image)

If you are not interested in the file name you can use ``core_average()`` instead.
::

imagecolor.core_average(image)


average all images in a directory
---------------------------------
Averages all images in a directory to a list of dicts with ``red``, ``green``, & ``blue`` keys along with the file name as ``name``
Averages all images in a directory to a list of dicts containing ``name``, ``red``, ``green``, & ``blue``
::

imagecolor.directory_average(image)
imagecolor.directory_average(directory)

average a directory
-------------------
Averages all images in a directory to a dict with ``red``, ``green``, & ``blue`` keys along with the directory name as ``name``
Averages all images in a directory to a dict containing ``name``, ``red``, ``green``, & ``blue``
::

imagecolor.single_directory_average(image)
imagecolor.single_directory_average(directory)

average nested directories
--------------------------
Uses ``single_directory_average`` to average the directory and all subdirectories containing images to a list of dicts with ``red``, ``green``, & ``blue`` keys along with each directory name as ``name``
Uses ``single_directory_average`` to average the directory and all subdirectories containing images to a list of dicts containing ``name``, ``red``, ``green``, & ``blue``
::

imagecolor.nested_directory_average(image)
imagecolor.nested_directory_average(directory)


For more details read the full module reference_
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def find_version(*file_paths):

# General information about the project.
project = 'imagecolor'
copyright = '2017, Rhys Hansen'
copyright = '2017-2018, Rhys Hansen'
author = 'Rhys Hansen'

# The version info for the project you're documenting, acts as replacement for
Expand Down

0 comments on commit aa5fa8c

Please sign in to comment.