{ "info": { "author": "sanjonemu", "author_email": "sanjo_nemu@yahoo.co.jp", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: End Users/Desktop", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 2.5", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 2 :: Only", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Utilities" ], "description": "pyxpm\n=====\n\nXPM image file loader for Python (to numpy ndarray or PIL) native C .pyd\n\nHow to use\n----------\n\n::\n\n from pyxpm import xpm\n import numpy as np\n import matplotlib.pyplot as plt\n # import matplotlib.image as mpimg\n from scipy import misc\n from PIL import Image\n\n fig = plt.figure()\n axis = [fig.add_subplot(211 + _) for _ in range(2)]\n s = open('/tmp/testdata.xpm', 'rb').read()\n nda = xpm.XPM(s) # as ndarray (dtype=np.uint8) BGR(A)\n r, c, m = nda.shape\n img = Image.frombuffer('RGBA', (c, r), nda, 'raw', 'BGRA', 0, 1)\n img.show() # PIL.Image\n bm = np.array(img) # RGB(A)\n axis[0].imshow(bm)\n misc.imsave('/tmp/testdata_0.gif', np.uint8(bm))\n misc.imsave('/tmp/testdata_1.gif', misc.bytescale(bm, cmin=0, cmax=255))\n im = misc.toimage(bm, cmin=0, cmax=255) # same as PIL.Image\n im.save('/tmp/testdata.png')\n axis[1].imshow(im)\n plt.show()\n\nLinks\n-----\n\ngithub https://github.com/sanjonemu/pyxpm\n\npyxpm https://pypi.python.org/pypi/pyxpm\n\nLicense\n-------\n\nMIT License", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/sanjonemu/pyxpm", "keywords": "XPM,matplotlib,scipy,numpy,PIL,image,bitmap", "license": "MIT License", "maintainer": null, "maintainer_email": null, "name": "pyxpm", "package_url": "https://pypi.org/project/pyxpm/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pyxpm/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/sanjonemu/pyxpm" }, "release_url": "https://pypi.org/project/pyxpm/1.0.1/", "requires_dist": null, "requires_python": null, "summary": "XPM image file loader for Python (to numpy ndarray or PIL) native C .pyd", "version": "1.0.1" }, "last_serial": 2443664, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "7a43d621d6c15095c6a272d989a3e3db", "sha256": "0550002df3b9cc9cb008156d06a3377c2c53f4470dac91c13f3dbc3213c30fc4" }, "downloads": -1, "filename": "pyxpm-1.0.1.tar.gz", "has_sig": false, "md5_digest": "7a43d621d6c15095c6a272d989a3e3db", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15375, "upload_time": "2016-11-05T01:34:02", "url": "https://files.pythonhosted.org/packages/2c/41/2d4a935e088269d26f827a852e9c69da4648a12d6fa5e299b63975b6af80/pyxpm-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7a43d621d6c15095c6a272d989a3e3db", "sha256": "0550002df3b9cc9cb008156d06a3377c2c53f4470dac91c13f3dbc3213c30fc4" }, "downloads": -1, "filename": "pyxpm-1.0.1.tar.gz", "has_sig": false, "md5_digest": "7a43d621d6c15095c6a272d989a3e3db", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15375, "upload_time": "2016-11-05T01:34:02", "url": "https://files.pythonhosted.org/packages/2c/41/2d4a935e088269d26f827a852e9c69da4648a12d6fa5e299b63975b6af80/pyxpm-1.0.1.tar.gz" } ] }