{ "info": { "author": "Matteo Landi", "author_email": "landimatte@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.5", "Programming Language :: Python :: 2.6", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "=====\nosaic\n=====\n\n**osaic** is a simple python module which let you create mosaics from\nimages by issuing a simple ``python -mosaic foo.jpg`` command.\n\nThe basic idea is to take as input a set of images: the first is used as\nbackground for the final mosaic; the others are indexed by average\ncolors and pated, as tiles, over the final mosaic.\n\nIn addition, users are enabled to specify the final size of the mosaic\n(relative to the size of the initial target image) and the number of\ntiles to use per side.\n\n\nDependencies\n============\n\nThe module depends on python ``PIL`` library (automatically fetched by\nthe installation script) for all the operations concerning *image\nprocessing*. In addition, to add support for *jpeg*\\s and *png*\\s\nimages, and to enable the module to display mosaics on screen, please\ninstall ``libjpeg``, ``libpng`` and ``libtk`` as well. \n\n\nInstall\n=======\n\nTo install **osaic**, you are enabled to grab it from both the mercurial\nrepository and from the Python Package Index (PyPI). The former is\npreferred for *bleeding-edge* users, even tough the latter is not\nguaranteed to be *very* stable as well.\n\n\nMercurial\n---------\n\nFrom sources::\n\n cd /wherever/you/want\n hg clone https://bitbucket.org/iamFIREcracker/osaic\n python setup.py install\n\n\nPyPI\n----\n\nFrom sources::\n\n cd /path/to/workspace\n wget http://pypi.python.org/packages/source/o/osaic/osaic-2.0.0.tar.gz\n tar zxvf osaic-2.0.0.tar.gz\n cd osaic-2.0.0\n python setup.py install\n\nFrom the PyPI::\n\n pip install osaic\n\n\nUsage\n=====\n\n**osaic** is a module that can be used both as a standalone application\nand as a standard python module.\n\n\nStandalone application\n----------------------\n\nA typical usage of the application is to display a mosaic composition\ncreated from a source image::\n\n python -mosaic image.jpg\n\nIf you want to save the output to a file instead of showing it::\n\n python -mosaic image.jpg -o mosaic-image.jpg\n\nFinally, if you want to create a mosaic which is 4 times bigger than the\noriginal image, and with 100 tiles per side, just issue::\n\n python -mosaic -z4 -t100 image.jpg\n\nFor everything else use the help message::\n\n python -mosaic -h\n\n\nLibrary\n-------\n\nThe module is a collection of objects and functions with different\ncapabilities: functions for vectors, color transformations, *image*\nobjects, image indexes and procedure wrappers.\n\nRegarding operation with vectors, the module implement some basic\nfunctions not included in standard Python but useful while working with\ncolors::\n\n >>> dotproduct([1, 2, 3], [4, 5, 6])\n 70\n >>> difference([1, 2, 3], [1, 2, 3])\n [0, 0, 0]\n >>> squaredistance([1, 2, 3], [0, 0, 0])\n 30\n\nIt is possible to find also a couple of functions wrapping up common\ncolors operations, like computation of the average color of an image and\ncolor quantization. The latter is particularly useful while trying to\nkeep the CPU work load at low levels::\n\n >>> average_color('almost-red.png')\n (240, 10, 20)\n >>> quantize_color((240, 10, 20), levels=2)\n (192, 64, 64)\n\nAs noted earlier, the module is built on top of the Python ``PIL``\nlibrary. However, we chose not export such *external* objects, but\nrather present to users some wrappers, namely `ImageWrapper`::\n\n >>> img = Image.open('foo.png')\n >>> img.size\n (640, 480)\n >>> img.reratio(5 / 1)\n >>> img.crop((0, 0, 10, 10))\n >>> img.size\n (10, 10)\n >>> img.show()\n\nWhile creating mosaics, it comes in handy to have to possibility to\nindex a set of images and make it possible to search which of them is\nthe most similar, in terms of *average color*, to another one. The\n``ImageList`` object is shipped with the module for this reason::\n\n >>> img_list = ImageList(['1.png', '2.png', '3.png'])\n >>> img_list.search((255, 0, 0))\n ImageTuple(filename='1.png', color=(255, 0, 0), image=None)\n\nFinally, the module is shipped with a ``mosaicify`` function which wraps\nup all the operations needed to create mosaic, including source images\nindexing, and search of neighbour images depending on the average\ncolor::\n\n >>> import osaic\n >>> osaic.mosaificy(\n ... target='foo.png',\n ... sources=['bar.png', 'asd.png', 'bazinga.png'],\n ... tiles=128,\n ... zoom=4,\n ... output='mosaic.png',\n ... )", "description_content_type": null, "docs_url": null, "download_url": "http://pypi.python.org/pypi/osaic", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/iamFIREcracker/osaic", "keywords": "photo,image,mosaic,creator", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "osaic", "package_url": "https://pypi.org/project/osaic/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/osaic/", "project_urls": { "Download": "http://pypi.python.org/pypi/osaic", "Homepage": "https://bitbucket.org/iamFIREcracker/osaic" }, "release_url": "https://pypi.org/project/osaic/2.0.0/", "requires_dist": null, "requires_python": null, "summary": "Create mosaics from images with ``python -mosaic image``", "version": "2.0.0" }, "last_serial": 795856, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "4dd68bd8cbacaed1d2bf783faf0065e1", "sha256": "2b864f5851ad82c2530f2ca03ec233a3bcc14d9786d6fe55c1d14642f0374f41" }, "downloads": -1, "filename": "osaic-1.0.0.tar.gz", "has_sig": false, "md5_digest": "4dd68bd8cbacaed1d2bf783faf0065e1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2987, "upload_time": "2011-03-06T23:17:16", "url": "https://files.pythonhosted.org/packages/43/17/36b9193f6e148cbcd74c0c77a6279c9eafddbe6f139a2a005fb24bc86b52/osaic-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "1748ca8e3a6cad10ec93a09d6d514385", "sha256": "6369b0e2d59aa90cddfaa9d309ea7ce35d09859fefbfb6be467630c5b3c2b5ed" }, "downloads": -1, "filename": "osaic-1.1.0-py2.5.egg", "has_sig": false, "md5_digest": "1748ca8e3a6cad10ec93a09d6d514385", "packagetype": "bdist_egg", "python_version": "2.5", "requires_python": null, "size": 7332, "upload_time": "2011-03-12T17:06:40", "url": "https://files.pythonhosted.org/packages/95/7f/1edd45425713619060b80bbd2aad983060b7d50a74cb83de401b22b3dcaf/osaic-1.1.0-py2.5.egg" }, { "comment_text": "", "digests": { "md5": "260dec55267189dc98fb26d99b35f8f9", "sha256": "b39c86f25fb66810f85f4ba3b9032c18c4f38090306c9bd0ec57ba7afe434bbe" }, "downloads": -1, "filename": "osaic-1.1.0-py2.6.egg", "has_sig": false, "md5_digest": "260dec55267189dc98fb26d99b35f8f9", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 7332, "upload_time": "2011-03-12T17:07:01", "url": "https://files.pythonhosted.org/packages/d6/f2/c438eb8e1a987d80e03cd1086b059361aee20d4dd6eb99e8e7326ccfb540/osaic-1.1.0-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "52f16ad9b68cd3a8c6d7bf0ac3cf881f", "sha256": "43918414c9cdfd937549d93240ff702e7eea208464b526ffc48981cab863e6ff" }, "downloads": -1, "filename": "osaic-1.1.0.tar.gz", "has_sig": false, "md5_digest": "52f16ad9b68cd3a8c6d7bf0ac3cf881f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4474, "upload_time": "2011-03-12T17:08:37", "url": "https://files.pythonhosted.org/packages/3e/ad/2638381c93e34a8e698562ee521bff614f5dac6d6203fdca20b79eeeb30f/osaic-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "de08669fa381aa5d70119661beb83630", "sha256": "d19c41a9fa369e8a1ee9339c4e388a302bffbd020ec0fc43a772c1c13a0028a3" }, "downloads": -1, "filename": "osaic-1.1.1-py2.5.egg", "has_sig": false, "md5_digest": "de08669fa381aa5d70119661beb83630", "packagetype": "bdist_egg", "python_version": "2.5", "requires_python": null, "size": 7365, "upload_time": "2011-03-13T00:33:40", "url": "https://files.pythonhosted.org/packages/2c/10/490d37c2cc532e00870ff28f3568ffb321fe7b0476317db146e92be55288/osaic-1.1.1-py2.5.egg" }, { "comment_text": "", "digests": { "md5": "ed6c35c0f95fbf93b7bd213a35326ff8", "sha256": "229be5808332d5da3014ad803ed69c32e426016a6306c452a4ba3c52c09948f8" }, "downloads": -1, "filename": "osaic-1.1.1-py2.6.egg", "has_sig": false, "md5_digest": "ed6c35c0f95fbf93b7bd213a35326ff8", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 7365, "upload_time": "2011-03-13T00:33:42", "url": "https://files.pythonhosted.org/packages/6a/a4/2b1e23d79c44d7a00f400d90f9bc642932bb0319c1d944df91d4ae35ac09/osaic-1.1.1-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "6a4ca548ddfc795c44fa84a04f104b43", "sha256": "cd7e8052c165964be079b2569cb22ec6058cd6bdd0140f75c67c002951eaf270" }, "downloads": -1, "filename": "osaic-1.1.1.tar.gz", "has_sig": false, "md5_digest": "6a4ca548ddfc795c44fa84a04f104b43", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4543, "upload_time": "2011-03-13T00:33:41", "url": "https://files.pythonhosted.org/packages/fc/9d/56a0dd86ba0d422ceee5bec3a29aee1cd8e19bc3e981cc82e7c2c033704f/osaic-1.1.1.tar.gz" }, { "comment_text": "", "digests": { "md5": "5bb91b9947adedc3c28580cb2091c195", "sha256": "91815d908a99397dd582a035662ae119186d9ac2229e92651f449537a58a5226" }, "downloads": -1, "filename": "osaic-1.1.1.win32-py2.5.exe", "has_sig": false, "md5_digest": "5bb91b9947adedc3c28580cb2091c195", "packagetype": "bdist_wininst", "python_version": "2.5", "requires_python": null, "size": 68490, "upload_time": "2011-03-13T12:01:03", "url": "https://files.pythonhosted.org/packages/8f/0b/09397465b1b7948070994a678eb2f00a6ad1b79331b8b632129ff0418e66/osaic-1.1.1.win32-py2.5.exe" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "03ef73cdc61257c770cf81c73e69f4db", "sha256": "bc186d48890126b9f10de3b168189370a36dafe16499d24d3d7b936e11b15809" }, "downloads": -1, "filename": "osaic-1.2.1-py2.5.egg", "has_sig": false, "md5_digest": "03ef73cdc61257c770cf81c73e69f4db", "packagetype": "bdist_egg", "python_version": "2.5", "requires_python": null, "size": 7394, "upload_time": "2011-03-13T12:03:40", "url": "https://files.pythonhosted.org/packages/36/3f/5b9ffd0d47046fac9107be8a4b0b826c782f410cd9a53229b7a5bd39328f/osaic-1.2.1-py2.5.egg" }, { "comment_text": "", "digests": { "md5": "82f5090ae9f5dd5c54fbabfeb3825e9c", "sha256": "17b36b4c7e8e12d078795a133b9ca97041e9683d73f431043389a091b8491982" }, "downloads": -1, "filename": "osaic-1.2.1-py2.6.egg", "has_sig": false, "md5_digest": "82f5090ae9f5dd5c54fbabfeb3825e9c", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 7394, "upload_time": "2011-03-13T12:03:42", "url": "https://files.pythonhosted.org/packages/56/6b/318e7a87c08611282e42a367c44f1e7603b216b72dd776429ae910a7656a/osaic-1.2.1-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "01ce4979510621b2e3933801c6ae999b", "sha256": "4bfc900a569e1b28a53347d0b3b9c7207c905e576fe4ba82c14839000dcedcc0" }, "downloads": -1, "filename": "osaic-1.2.1.tar.gz", "has_sig": false, "md5_digest": "01ce4979510621b2e3933801c6ae999b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5462, "upload_time": "2011-03-13T12:03:41", "url": "https://files.pythonhosted.org/packages/12/18/e2c21dcbbfee6876b6ac193606e3c69df4beb1fd8ff89ab2f02f96f80aee/osaic-1.2.1.tar.gz" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "ed045a175f65e8c4fe82eded0132a9f5", "sha256": "de2fc7aa09b945632593fa1179dd2ecfd624c7a920ed1a60128f748ecf65a2af" }, "downloads": -1, "filename": "osaic-2.0.0.cygwin-1.7.9-i686-py2.6.exe", "has_sig": false, "md5_digest": "ed045a175f65e8c4fe82eded0132a9f5", "packagetype": "bdist_wininst", "python_version": "2.6", "requires_python": null, "size": 68831, "upload_time": "2011-06-20T00:42:03", "url": "https://files.pythonhosted.org/packages/4d/45/a1a6a943fe04d8462608b0fdd142a28ceb88c638aecc2fe805d0704277cf/osaic-2.0.0.cygwin-1.7.9-i686-py2.6.exe" }, { "comment_text": "", "digests": { "md5": "6f89a66834f32611e42b6a3bbb423def", "sha256": "bcc3585d85b6e2b5495b35306667de949229f5ed31ef2f34689b6af4a86001d9" }, "downloads": -1, "filename": "osaic-2.0.0-py2.6.egg", "has_sig": false, "md5_digest": "6f89a66834f32611e42b6a3bbb423def", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 17238, "upload_time": "2011-06-20T00:37:19", "url": "https://files.pythonhosted.org/packages/2b/24/db982b40e65490d1fe020d3c745b40c8f0f9dc637f7a01e2df995167b161/osaic-2.0.0-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "95a133e863b2529ba5af48564b9f935e", "sha256": "cfaebbbb0ab4d0e3e61ddb0fcc45bc16e4c292f6e13fe99f67dfbbdc16ca57bc" }, "downloads": -1, "filename": "osaic-2.0.0-py2.7.egg", "has_sig": false, "md5_digest": "95a133e863b2529ba5af48564b9f935e", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 17184, "upload_time": "2011-06-20T00:37:22", "url": "https://files.pythonhosted.org/packages/e6/c8/b38aebe28104ca40a3fc2682e2e1e545c849d45b33882e04093f0df5c9ea/osaic-2.0.0-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "be41e57d6e31d3f3ac29837a7db2d247", "sha256": "4387f5fa2def78714fc1094d147e9d8f80bdac4d93dab0f367651c57469b2fa4" }, "downloads": -1, "filename": "osaic-2.0.0.tar.gz", "has_sig": false, "md5_digest": "be41e57d6e31d3f3ac29837a7db2d247", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12130, "upload_time": "2011-06-20T00:37:21", "url": "https://files.pythonhosted.org/packages/de/5a/3f380b6ca7fbbc67e34bacb26397b2560476d2e25f79ebacdfe1425ff1b5/osaic-2.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ed045a175f65e8c4fe82eded0132a9f5", "sha256": "de2fc7aa09b945632593fa1179dd2ecfd624c7a920ed1a60128f748ecf65a2af" }, "downloads": -1, "filename": "osaic-2.0.0.cygwin-1.7.9-i686-py2.6.exe", "has_sig": false, "md5_digest": "ed045a175f65e8c4fe82eded0132a9f5", "packagetype": "bdist_wininst", "python_version": "2.6", "requires_python": null, "size": 68831, "upload_time": "2011-06-20T00:42:03", "url": "https://files.pythonhosted.org/packages/4d/45/a1a6a943fe04d8462608b0fdd142a28ceb88c638aecc2fe805d0704277cf/osaic-2.0.0.cygwin-1.7.9-i686-py2.6.exe" }, { "comment_text": "", "digests": { "md5": "6f89a66834f32611e42b6a3bbb423def", "sha256": "bcc3585d85b6e2b5495b35306667de949229f5ed31ef2f34689b6af4a86001d9" }, "downloads": -1, "filename": "osaic-2.0.0-py2.6.egg", "has_sig": false, "md5_digest": "6f89a66834f32611e42b6a3bbb423def", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 17238, "upload_time": "2011-06-20T00:37:19", "url": "https://files.pythonhosted.org/packages/2b/24/db982b40e65490d1fe020d3c745b40c8f0f9dc637f7a01e2df995167b161/osaic-2.0.0-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "95a133e863b2529ba5af48564b9f935e", "sha256": "cfaebbbb0ab4d0e3e61ddb0fcc45bc16e4c292f6e13fe99f67dfbbdc16ca57bc" }, "downloads": -1, "filename": "osaic-2.0.0-py2.7.egg", "has_sig": false, "md5_digest": "95a133e863b2529ba5af48564b9f935e", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 17184, "upload_time": "2011-06-20T00:37:22", "url": "https://files.pythonhosted.org/packages/e6/c8/b38aebe28104ca40a3fc2682e2e1e545c849d45b33882e04093f0df5c9ea/osaic-2.0.0-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "be41e57d6e31d3f3ac29837a7db2d247", "sha256": "4387f5fa2def78714fc1094d147e9d8f80bdac4d93dab0f367651c57469b2fa4" }, "downloads": -1, "filename": "osaic-2.0.0.tar.gz", "has_sig": false, "md5_digest": "be41e57d6e31d3f3ac29837a7db2d247", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12130, "upload_time": "2011-06-20T00:37:21", "url": "https://files.pythonhosted.org/packages/de/5a/3f380b6ca7fbbc67e34bacb26397b2560476d2e25f79ebacdfe1425ff1b5/osaic-2.0.0.tar.gz" } ] }