{ "info": { "author": "Luper Rouch", "author_email": "luper.rouch@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License (GPL)", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Cython", "Programming Language :: Python", "Topic :: Multimedia :: Graphics :: Graphics Conversion", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "potrace Python bindings\n=======================\n\nThese bindings provide an object oriented API to the `potrace`_ library.\n\nExample usage\n-------------\n\nThe bindings work with input images represented as numpy arrays::\n\n import numpy as np\n import potrace\n\n # Make a numpy array with a rectangle in the middle\n data = np.zeros((32, 32), np.uint32)\n data[8:32-8, 8:32-8] = 1\n\n # Create a bitmap from the array\n bmp = potrace.Bitmap(data)\n\n # Trace the bitmap to a path\n path = bmp.trace()\n\n # Iterate over path curves\n for curve in path:\n print \"start_point =\", curve.start_point\n for segment in curve:\n print segment\n end_point_x, end_point_y = segment.end_point\n if segment.is_corner:\n c_x, c_y = segment.c\n else:\n c1_x, c1_y = segment.c1\n c2_x, c2_y = segment.c2\n\nInstallation\n------------\n\nUbuntu\n~~~~~~\n\nInstall system dependencies::\n\n $ sudo apt-get install build-essential python-dev libagg-dev libpotrace-dev pkg-config\n\nInstall pypotrace::\n\n $ git clone https://github.com/flupke/pypotrace.git\n $ cd pypotrace\n $ pip install numpy\n $ pip install .\n\nCentOS/RedHat\n~~~~~~~~~~~~~\n\nInstall system dependencies::\n\n $ sudo yum -y groupinstall \"Development Tools\"\n $ sudo yum -y install agg-devel potrace-devel python-devel\n\nInstall pypotrace::\n\n $ git clone https://github.com/flupke/pypotrace.git\n $ cd pypotrace\n $ pip install numpy\n $ pip install .\n\nOSX\n~~~\n\nInstall system dependencies::\n\n $ brew install libagg pkg-config potrace\n\nInstall pypotrace::\n\n $ git clone https://github.com/flupke/pypotrace.git\n $ cd pypotrace\n $ pip install numpy\n $ pip install .\n\nWindows\n~~~~~~~\n\n*Thanks to* `klonuo `_ *for the instructions*\n\nHere are instruction how to make this package work on Windows, by using MinGW\nsystem. Probably it can be done with Visual Studio, but I lack skills to make\nsuch magic.\n\nSo assuming user has MinGW available, additional two packages are needed:\n\n1. potrace source: http://potrace.sourceforge.net/#downloading\n2. agg source: http://www.antigrain.com/download/index.html\n\nI extracted both packages in my ``C:\\src`` folder. Both are easy to build by\nexecuting ``./configure; make`` and ``./autogen.sh; make`` respectively, on\nMSYS prompt.\n\nAfter that, we need some variables to build pypotrace successfully:\n\nFirst, includes paths:\n\n* \"numpy/arrayobject.h\": ``C:/Python27/Lib/site-packages/numpy/core/include``\n* potrace headers: ``C:/src/potrace-1.11/src``\n* agg headers: ``C:/src/agg-2.5``\n\nthere is a little catch for agg includes, as paths referenced in cpp sources\npoint to ``agg2/*.h`` while in downloaded agg package we don't have ``agg2``\nfolder. For me it was easiest to rename ``C:/src/agg-2.5/include`` to\n``C:/src/agg-2.5/agg2`` and use ``C:/src/agg-2.5`` as agg include folder.\n\nNext, libdirs for libraries we build above:\n\n* potrace: ``C:/src/potrace-1.11/src/.libs``\n* agg: ``C:/src/agg-2.5/src``\n\nand we can make pypotrace build command, and execute it::\n\n python setup.py build_ext -IC:/Python27/Lib/site-packages/numpy/core/include;C:/src/potrace-1.11/src;C:/src/agg-2.5 -LC:/src/potrace-1.11/src/.libs;C:/src/agg-2.5/src\n\nFinally install the package::\n\n C:\\src\\git\\pypotrace>python setup.py install\n running install\n running build\n running build_py\n copying potrace\\__init__.py -> build\\lib.win32-2.7\\potrace\n copying potrace\\agg\\__init__.py -> build\\lib.win32-2.7\\potrace\\agg\n running build_ext\n skipping 'potrace\\_potrace.c' Cython extension (up-to-date)\n skipping 'potrace\\bezier.cpp' Cython extension (up-to-date)\n skipping 'potrace/agg\\curves.cpp' Cython extension (up-to-date)\n running install_lib\n creating C:\\Python27\\Lib\\site-packages\\potrace\n creating C:\\Python27\\Lib\\site-packages\\potrace\\agg\n copying build\\lib.win32-2.7\\potrace\\agg\\curves.pyd -> C:\\Python27\\Lib\\site-packages\\potrace\\agg\n copying build\\lib.win32-2.7\\potrace\\agg\\__init__.py -> C:\\Python27\\Lib\\site-packages\\potrace\\agg\n copying build\\lib.win32-2.7\\potrace\\bezier.pyd -> C:\\Python27\\Lib\\site-packages\\potrace\n copying build\\lib.win32-2.7\\potrace\\_potrace.pyd -> C:\\Python27\\Lib\\site-packages\\potrace\n copying build\\lib.win32-2.7\\potrace\\__init__.py -> C:\\Python27\\Lib\\site-packages\\potrace\n byte-compiling C:\\Python27\\Lib\\site-packages\\potrace\\agg\\__init__.py to __init__.pyc\n byte-compiling C:\\Python27\\Lib\\site-packages\\potrace\\__init__.py to __init__.pyc\n running install_egg_info\n Writing C:\\Python27\\Lib\\site-packages\\pypotrace-0.1-py2.7.egg-info\n\nRunning tests\n-------------\n\nYou can check everything is working correctly by running the tests::\n\n $ pip install '.[dev]'\n $ nosetests -v\n\nDocumentation\n-------------\n\nThe documentation is hosted here: http://packages.python.org/pypotrace\n\nA copy is also included in the ``doc/_build/html`` directory of the source\ndistribution.\n\nHomepage\n--------\n\nThis project is hosted on github: http://github.com/flupke/pypotrace\n\n.. _potrace: http://potrace.sourceforge.net/", "description_content_type": "", "docs_url": "https://pythonhosted.org/pypotrace/", "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/flupke/pypotrace", "keywords": "potrace bitmap vector graphics", "license": "", "maintainer": "", "maintainer_email": "", "name": "pypotrace", "package_url": "https://pypi.org/project/pypotrace/", "platform": "", "project_url": "https://pypi.org/project/pypotrace/", "project_urls": { "Homepage": "http://github.com/flupke/pypotrace" }, "release_url": "https://pypi.org/project/pypotrace/0.2/", "requires_dist": null, "requires_python": "", "summary": "potrace Python bindings", "version": "0.2" }, "last_serial": 5994809, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "4b8dd2656691abc9cd769efd7652e69b", "sha256": "5761e6b60bc8d9e6870aafb65184df57bac46a99287a2aa126162a9eb84376b4" }, "downloads": -1, "filename": "pypotrace-0.1.tar.gz", "has_sig": false, "md5_digest": "4b8dd2656691abc9cd769efd7652e69b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 191035, "upload_time": "2010-04-12T08:50:29", "url": "https://files.pythonhosted.org/packages/01/05/a444e108b9bc645fafd02c52eac81bb0b1ed23dc504ca70fad61d6706c57/pypotrace-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "155a2fb066db5cc204863a06ce935363", "sha256": "58662529a7b701de85d83a8911b17195fd833cde18ddb1cb4088e36e406c9e49" }, "downloads": -1, "filename": "pypotrace-0.1.1.tar.gz", "has_sig": false, "md5_digest": "155a2fb066db5cc204863a06ce935363", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 196293, "upload_time": "2013-05-18T12:58:19", "url": "https://files.pythonhosted.org/packages/1f/a6/8d20d5fc78cd1fadaafcfd3bf0315089756560dbf590b413607bcad8dcb1/pypotrace-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "09011f27461722b15dc4742d45c97532", "sha256": "51a1403645c4e6bd6a2afb75330a27fbf84c5c476b076c58292958594155d496" }, "downloads": -1, "filename": "pypotrace-0.1.2.tar.gz", "has_sig": false, "md5_digest": "09011f27461722b15dc4742d45c97532", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 196302, "upload_time": "2013-06-27T17:43:28", "url": "https://files.pythonhosted.org/packages/a1/30/bab0f7d2f69223a2f687e8ae2ed411ce03ebed5ec8efb5509aec4c432b86/pypotrace-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "ca6620cd56f41464ac12a970cdf89391", "sha256": "6514cc938867e92d6fdc554f045acfc8f6a8fb28f8694a1e8922f482d0225ef8" }, "downloads": -1, "filename": "pypotrace-0.1.3.tar.gz", "has_sig": false, "md5_digest": "ca6620cd56f41464ac12a970cdf89391", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 224730, "upload_time": "2016-12-08T06:49:08", "url": "https://files.pythonhosted.org/packages/28/6f/59ebf9fa50553426d28c0aec6d0690e84cca3841edd10276afaaedb8d02b/pypotrace-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "4dbd3a720a3e6f2baddb676d98d67888", "sha256": "2fe7eec8715093d64c0dfb468ea0dd413fe3bd1845983474d66be8f3f4c084a4" }, "downloads": -1, "filename": "pypotrace-0.1.4.tar.gz", "has_sig": false, "md5_digest": "4dbd3a720a3e6f2baddb676d98d67888", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 231375, "upload_time": "2019-01-10T22:39:16", "url": "https://files.pythonhosted.org/packages/fa/10/cd7ce3148ac390032ad5c6f687ca20f924e4abcaf2f3d9a10dc13cbbe4b2/pypotrace-0.1.4.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "18e4792d25e6285c40b55d2b364ae79b", "sha256": "7e06c10f515b92c6ae3decc2a1b5ffb12f666d00b72ecec285ed0cbdce8ad255" }, "downloads": -1, "filename": "pypotrace-0.2.tar.gz", "has_sig": false, "md5_digest": "18e4792d25e6285c40b55d2b364ae79b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26689, "upload_time": "2019-10-18T10:03:07", "url": "https://files.pythonhosted.org/packages/a8/66/3b6236524ef1f3655397ed87c08564f9e7364c6922c12f948bace59a4d96/pypotrace-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "18e4792d25e6285c40b55d2b364ae79b", "sha256": "7e06c10f515b92c6ae3decc2a1b5ffb12f666d00b72ecec285ed0cbdce8ad255" }, "downloads": -1, "filename": "pypotrace-0.2.tar.gz", "has_sig": false, "md5_digest": "18e4792d25e6285c40b55d2b364ae79b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26689, "upload_time": "2019-10-18T10:03:07", "url": "https://files.pythonhosted.org/packages/a8/66/3b6236524ef1f3655397ed87c08564f9e7364c6922c12f948bace59a4d96/pypotrace-0.2.tar.gz" } ] }