{ "info": { "author": "Rhys Hansen", "author_email": "rhyshonline@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Other Audience", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Topic :: Artistic Software", "Topic :: Multimedia :: Graphics" ], "description": "========================================\nimagecolors - Extract colors from images\n========================================\n\n|version| |github| |python35| |license| |format|\n\n.. |version| image:: https://img.shields.io/pypi/v/imagecolor.svg\n :target: https://pypi.python.org/pypi/imagecolor\n.. |python35| image:: https://img.shields.io/badge/Python-3.5-brightgreen.svg\n :target: https://www.python.org/\n.. |license| image:: https://img.shields.io/badge/License-MIT-blue.svg\n :target: https://github.com/Tathorack/imagecolor/blob/master/LICENSE.md\n.. |github| image:: https://img.shields.io/github/tag/Tathorack/imagecolor.svg\n :target: https://github.com/Tathorack/imagecolor\n.. |format| image:: https://img.shields.io/pypi/format/imagecolor.svg\n :target: https://pypi.python.org/pypi/imagecolor\n\n------------------------------------------------------------\nThis module uses PIL (Pillow) to extract colors from images\n------------------------------------------------------------\n\nAvailable functions\n===================\naverage(image, name=None, downsample=True, max_size=100, alpha_threshold=None)\n==============================================================================\nAverages a single image into RGB color values. Returns a dictionary with the following keys: ``name``, ``red``, ``green``, ``blue``\n\n* ``image`` - filename (string), pathlib.Path object or a file object. The file object must implement ``read()``, ``seek()``, and ``tell()`` methods, and be opened in binary mode.\n* ``name`` - auto generated from image path by calling ``image.split(os.sep)[-1]`` unless set.\n* ``downsample`` - chooses if downsampling is enabled to speed up processing. Enabled by default.\n* ``max_size`` - max length of longest side if ``downsample`` is True\n* ``alpha_threshold`` - level at which transparent pixels are excluded from the average. Default is 245\n\naverage_images(dir_in)\n======================\nAverages each individual image in a directory and returns a list with an entry for each image successfully averaged. Returns a list containing a dictionary for each image with the following keys: ``name``, ``red``, ``green``, ``blue``\n\n* ``dir_in`` - path to directory\n\ndirectory_average(dir_in, name=None)\n====================================\nAverages all images in a directory to a singular RGB directory average. Returns a dictionary with the following keys: ``name``, ``red``, ``green``, ``blue``\n\n* ``dir_in`` - path to directory\n* ``name`` - auto generated from directory path by calling ``dir_in.split(os.sep)[-1]`` unless set.\n\nnested_directory_average(root_dir)\n==================================\nAccepts the path to a directory and walks all the enclosed directories calling ``average_directory`` for each one that contains images. Returns a list containing a dictionary for each directory with the following keys: ``name``, ``red``, ``green``, ``blue``\n\n* ``root_dir`` - path to starting directory\n\nFuture work\n===========\n* add usage examples to readme\n* add information for loadsave functions to readme\n\nTests\n=====\nTesting is done with pytest_\n\n.. _pytest: http://docs.pytest.org/en/latest/\n\nRun with ``python3 setup.py test``\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Tathorack/imagecolor", "keywords": "image average color", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "imagecolor", "package_url": "https://pypi.org/project/imagecolor/", "platform": "", "project_url": "https://pypi.org/project/imagecolor/", "project_urls": { "Homepage": "https://github.com/Tathorack/imagecolor" }, "release_url": "https://pypi.org/project/imagecolor/1.2.1/", "requires_dist": [ "Pillow" ], "requires_python": "", "summary": "Image color extraction", "version": "1.2.1" }, "last_serial": 3479726, "releases": { "1.1.8": [ { "comment_text": "", "digests": { "md5": "0c2de2bbb4a8c95a9f20076aafc13336", "sha256": "6d115a0a531cd99ecc9f23daf3590fec7fa2be86a09882feb9d273de9721e37a" }, "downloads": -1, "filename": "imagecolor-1.1.8-py3-none-any.whl", "has_sig": false, "md5_digest": "0c2de2bbb4a8c95a9f20076aafc13336", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9945, "upload_time": "2017-03-02T19:38:58", "url": "https://files.pythonhosted.org/packages/b5/6e/258b934d27b2247161f605e7d56588865331e8141bc519fb005e92e1834d/imagecolor-1.1.8-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "aba70540da96b6218736d085ca139b18", "sha256": "104321c7a23185c312ce80c4106a5f9e0eb1d7f4af26393cb45c1fabf00b2eaf" }, "downloads": -1, "filename": "imagecolor-1.1.8.tar.gz", "has_sig": false, "md5_digest": "aba70540da96b6218736d085ca139b18", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6568, "upload_time": "2017-03-02T19:39:17", "url": "https://files.pythonhosted.org/packages/53/07/337a403b8dfd96cf05353db3b20426257ae287d0f337182c0faa7632c70a/imagecolor-1.1.8.tar.gz" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "13f9928bd81c38242d09f52bc91d9d0b", "sha256": "2555a8758d792dd66dfc35f6173734dd1913db79d5a80e6833da5aa11d285b16" }, "downloads": -1, "filename": "imagecolor-1.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "13f9928bd81c38242d09f52bc91d9d0b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10250, "upload_time": "2017-12-26T19:32:10", "url": "https://files.pythonhosted.org/packages/a0/90/4c66e0b0c417e920706339f7e6737ac8793a18f9204b6a1f84a8d09d1a91/imagecolor-1.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e5f910bd2352823ac1a931efe6d3ce66", "sha256": "4aa979089b91989fc99df75e8e790cfb48ab1d8760efd853f2b2bc0edaf0d391" }, "downloads": -1, "filename": "imagecolor-1.2.1.tar.gz", "has_sig": false, "md5_digest": "e5f910bd2352823ac1a931efe6d3ce66", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6921, "upload_time": "2017-12-26T19:32:26", "url": "https://files.pythonhosted.org/packages/9a/81/144e6d37c341dafa7bc02fd185c7225f8476fc63f2953888c6dc00beba50/imagecolor-1.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "13f9928bd81c38242d09f52bc91d9d0b", "sha256": "2555a8758d792dd66dfc35f6173734dd1913db79d5a80e6833da5aa11d285b16" }, "downloads": -1, "filename": "imagecolor-1.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "13f9928bd81c38242d09f52bc91d9d0b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10250, "upload_time": "2017-12-26T19:32:10", "url": "https://files.pythonhosted.org/packages/a0/90/4c66e0b0c417e920706339f7e6737ac8793a18f9204b6a1f84a8d09d1a91/imagecolor-1.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e5f910bd2352823ac1a931efe6d3ce66", "sha256": "4aa979089b91989fc99df75e8e790cfb48ab1d8760efd853f2b2bc0edaf0d391" }, "downloads": -1, "filename": "imagecolor-1.2.1.tar.gz", "has_sig": false, "md5_digest": "e5f910bd2352823ac1a931efe6d3ce66", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6921, "upload_time": "2017-12-26T19:32:26", "url": "https://files.pythonhosted.org/packages/9a/81/144e6d37c341dafa7bc02fd185c7225f8476fc63f2953888c6dc00beba50/imagecolor-1.2.1.tar.gz" } ] }