{ "info": { "author": "Aiden Nibali", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Topic :: Multimedia :: Graphics :: Graphics Conversion" ], "description": "# WebP Python bindings\n\n[![CircleCI](https://img.shields.io/circleci/project/github/anibali/pywebp.svg)](https://circleci.com/gh/anibali/pywebp)\n[![license](https://img.shields.io/github/license/anibali/pywebp.svg)](https://github.com/anibali/pywebp/blob/master/LICENSE)\n[![GitHub](https://img.shields.io/badge/github-anibali%2Fpywebp-blue.svg)](https://github.com/anibali/pywebp)\n\n## Installation\n\n```sh\npip install webp\n```\n\n### Requirements\n\n* [libwebp](https://github.com/webmproject/libwebp) (tested with v1.0.3)\n - Install libwebpmux and libwebpdemux components as well.\n - Check out the Dockerfile for steps to build from source on Ubuntu.\n* Python 3 (tested with v3.6)\n* cffi (tested with 1.10.0)\n* Pillow (tested with v4.1.1)\n* numpy (tested with v1.12.1)\n\n## Usage\n\n```python\nimport webp\n```\n\n### Simple API\n\n```python\n# Save an image\nwebp.save_image(img, 'image.webp', quality=80)\n\n# Load an image\nimg = webp.load_image('image.webp', 'RGBA')\n\n# Save an animation\nwebp.save_images(imgs, 'anim.webp', fps=10, lossless=True)\n\n# Load an animation\nimgs = webp.load_images('anim.webp', 'RGB', fps=10)\n```\n\nIf you prefer working with numpy arrays, use the functions `imwrite`, `imread`, `mimwrite`,\nand `mimread` instead.\n\n### Advanced API\n\n```python\n# Encode a PIL image to WebP in memory, with encoder hints\npic = webp.WebPPicture.from_pil(img)\nconfig = WebPConfig.new(preset=webp.WebPPreset.PHOTO, quality=70)\nbuf = pic.encode(config).buffer()\n\n# Read a WebP file and decode to a BGR numpy array\nwith open('image.webp', 'rb') as f:\n webp_data = webp.WebPData.from_buffer(f.read())\n arr = webp_data.decode(color_mode=WebPColorMode.BGR)\n\n# Save an animation\nenc = webp.WebPAnimEncoder.new(width, height)\ntimestamp_ms = 0\nfor img in imgs:\n pic = webp.WebPPicture.from_pil(img)\n enc.encode_frame(pic, timestamp_ms)\n timestamp_ms += 250\nanim_data = enc.assemble(timestamp_ms)\nwith open('anim.webp', 'wb') as f:\n f.write(anim_data.buffer())\n\n# Load an animation\nwith open('anim.webp', 'rb') as f:\n webp_data = webp.WebPData.from_buffer(f.read())\n dec = webp.WebPAnimDecoder.new(webp_data)\n for arr, timestamp_ms in dec.frames():\n # `arr` contains decoded pixels for the frame\n # `timestamp_ms` contains the _end_ time of the frame\n pass\n```\n\n## Features\n\n* Picture encoding/decoding\n* Animation encoding/decoding\n* Automatic memory management\n* Simple API for working with `PIL.Image` objects\n\n### Not implemented\n\n* Encoding/decoding still images in YUV color mode\n* Advanced muxing/demuxing (color profiles, etc.)\n* Expose all useful fields\n\n## Developer notes\n\n### Running tests\n\nThe CircleCI local CLI should be used to run tests in an isolated environment:\n\n```bash\n$ circleci local execute\n```\n\n## Known issues\n\n* An animation where all frames are identical will \"collapse\" in on itself,\n resulting in a single frame. Unfortunately, WebP seems to discard timestamp\n information in this case, which breaks `webp.load_images` when the FPS\n is specified.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/anibali/pywebp", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "webp", "package_url": "https://pypi.org/project/webp/", "platform": "", "project_url": "https://pypi.org/project/webp/", "project_urls": { "Homepage": "https://github.com/anibali/pywebp" }, "release_url": "https://pypi.org/project/webp/0.1.0a15/", "requires_dist": null, "requires_python": "", "summary": "Python bindings for WebP", "version": "0.1.0a15" }, "last_serial": 5992483, "releases": { "0.1.0a10": [ { "comment_text": "", "digests": { "md5": "d13e74d4a92f293d54fb245d1193d0bf", "sha256": "5de9e38736039ff33a1afa330d8cdde3fa949fe22cfcd0e242e084264949aa06" }, "downloads": -1, "filename": "webp-0.1.0a10.tar.gz", "has_sig": false, "md5_digest": "d13e74d4a92f293d54fb245d1193d0bf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9383, "upload_time": "2018-10-30T23:04:40", "url": "https://files.pythonhosted.org/packages/a4/b8/cd3c1b43f7afc09b15492a9690a755e030950e8ce9a887c8677bfdd14bd8/webp-0.1.0a10.tar.gz" } ], "0.1.0a11": [ { "comment_text": "", "digests": { "md5": "723da658a36636a70128f8fac625f255", "sha256": "3fe78a496ab26b54621507d1d9ea70b0008f47335dc1ba5885065bdaaa35d537" }, "downloads": -1, "filename": "webp-0.1.0a11.tar.gz", "has_sig": false, "md5_digest": "723da658a36636a70128f8fac625f255", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9793, "upload_time": "2018-12-13T02:44:48", "url": "https://files.pythonhosted.org/packages/8c/43/f0dbe7c7d700970747effd4762522b653012d0330f113fdb3618a56ebdc1/webp-0.1.0a11.tar.gz" } ], "0.1.0a12": [ { "comment_text": "", "digests": { "md5": "2c18a7b4275ac0b0b8617f1724877984", "sha256": "8958d76d6b8e4abda987cb08cc9fe06807a2e68eecd17e9c90ff921cac37dbbc" }, "downloads": -1, "filename": "webp-0.1.0a12.tar.gz", "has_sig": false, "md5_digest": "2c18a7b4275ac0b0b8617f1724877984", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9817, "upload_time": "2019-01-03T21:52:58", "url": "https://files.pythonhosted.org/packages/9d/b7/cba98b54852315af5cf5b4203b6da2e05931e3afeada4b75a7ff2703161d/webp-0.1.0a12.tar.gz" } ], "0.1.0a13": [ { "comment_text": "", "digests": { "md5": "92c16b6e65806b8849762a7b9f7be2f1", "sha256": "dfb4d54fc4aad9ce2d85f67b37a54a6adcd86ab6ded13caaad72050f0c846c3a" }, "downloads": -1, "filename": "webp-0.1.0a13.tar.gz", "has_sig": false, "md5_digest": "92c16b6e65806b8849762a7b9f7be2f1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9481, "upload_time": "2019-03-05T10:37:03", "url": "https://files.pythonhosted.org/packages/6e/55/0072f94045bd2bb7215fb91b22b731b78a9e11bc9f8614ec25837555406c/webp-0.1.0a13.tar.gz" } ], "0.1.0a14": [ { "comment_text": "", "digests": { "md5": "1d1a9deaa2431d93ca512857b999cb16", "sha256": "d8d486b7c3fa9972308b6a369fe4694a2665dab5b5427935b520654bf62d5677" }, "downloads": -1, "filename": "webp-0.1.0a14.tar.gz", "has_sig": false, "md5_digest": "1d1a9deaa2431d93ca512857b999cb16", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9547, "upload_time": "2019-09-30T05:48:44", "url": "https://files.pythonhosted.org/packages/c8/42/84409f89cc5ddf98e9a3872f14c72488578bc1067cdc76c5f0f48537c170/webp-0.1.0a14.tar.gz" } ], "0.1.0a15": [ { "comment_text": "", "digests": { "md5": "e8ba4019ba7cd0120328d9a590d1bfd3", "sha256": "055a3fefdbb10c3f6da2a3512225517283f1b61b98de82c1adf244d1e133a49a" }, "downloads": -1, "filename": "webp-0.1.0a15.tar.gz", "has_sig": false, "md5_digest": "e8ba4019ba7cd0120328d9a590d1bfd3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9549, "upload_time": "2019-10-17T21:27:09", "url": "https://files.pythonhosted.org/packages/34/d7/dd81a082fde35710e971af4cff7d30bca089979709a9fe971c87ffce7568/webp-0.1.0a15.tar.gz" } ], "0.1.0a4": [ { "comment_text": "", "digests": { "md5": "4489fe3a70c266c563f620b43322738b", "sha256": "9db076b1704fbfdf1f152b0360d39f7cb85b2b381aa75313ec7918f1e60cc908" }, "downloads": -1, "filename": "webp-0.1.0a4.tar.gz", "has_sig": false, "md5_digest": "4489fe3a70c266c563f620b43322738b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7246, "upload_time": "2017-06-09T00:55:27", "url": "https://files.pythonhosted.org/packages/e6/79/230182cc19db801924c9cdbda2a84992a00eeba403a1df0c78bef9d9258f/webp-0.1.0a4.tar.gz" } ], "0.1.0a5": [ { "comment_text": "", "digests": { "md5": "37eea0d081ad19e060dfd22727cd3dfe", "sha256": "368fac3946eb6f20260a6110d701550e2f5607efbe4e0866f016561e02649c82" }, "downloads": -1, "filename": "webp-0.1.0a5.tar.gz", "has_sig": false, "md5_digest": "37eea0d081ad19e060dfd22727cd3dfe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8259, "upload_time": "2017-06-09T02:39:19", "url": "https://files.pythonhosted.org/packages/35/96/aa9ed4f28415ebc19ed4ce28d0f8ef1fa8e8d8c09417949848893ae0ee16/webp-0.1.0a5.tar.gz" } ], "0.1.0a6": [ { "comment_text": "", "digests": { "md5": "c491b415b1761437288be2f6853344cc", "sha256": "844af8c667ef6bc54aa73e20a5520146721076030abc00969de49a3497a96f2f" }, "downloads": -1, "filename": "webp-0.1.0a6.tar.gz", "has_sig": false, "md5_digest": "c491b415b1761437288be2f6853344cc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8271, "upload_time": "2017-06-12T22:53:55", "url": "https://files.pythonhosted.org/packages/69/4c/47cc15fa2eccbd01ed226c1e0a254b8f7c07d5f8f9d43bada193aab68e96/webp-0.1.0a6.tar.gz" } ], "0.1.0a7": [ { "comment_text": "", "digests": { "md5": "a353d1f0e71b6616246e6bc74854057b", "sha256": "87180f46d1911c969ab4401bbce7304948306646b39e7cec8bf3aa6759a7be94" }, "downloads": -1, "filename": "webp-0.1.0a7.tar.gz", "has_sig": false, "md5_digest": "a353d1f0e71b6616246e6bc74854057b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8608, "upload_time": "2017-06-13T03:25:35", "url": "https://files.pythonhosted.org/packages/bc/37/f269d27987fc049902d5505a0f404707aea003c1ce55f6fb3a476f29cd8d/webp-0.1.0a7.tar.gz" } ], "0.1.0a9": [ { "comment_text": "", "digests": { "md5": "f6edd16381e625bc07485989d7adab85", "sha256": "c4564a6802423748b10078aa494b2250f24f122c7af739060312732659b42f36" }, "downloads": -1, "filename": "webp-0.1.0a9.tar.gz", "has_sig": false, "md5_digest": "f6edd16381e625bc07485989d7adab85", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9387, "upload_time": "2018-09-26T03:28:09", "url": "https://files.pythonhosted.org/packages/ab/45/24634c92c9e8b5788607320288de5f673d37aa8e224f2d178244a104f734/webp-0.1.0a9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e8ba4019ba7cd0120328d9a590d1bfd3", "sha256": "055a3fefdbb10c3f6da2a3512225517283f1b61b98de82c1adf244d1e133a49a" }, "downloads": -1, "filename": "webp-0.1.0a15.tar.gz", "has_sig": false, "md5_digest": "e8ba4019ba7cd0120328d9a590d1bfd3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9549, "upload_time": "2019-10-17T21:27:09", "url": "https://files.pythonhosted.org/packages/34/d7/dd81a082fde35710e971af4cff7d30bca089979709a9fe971c87ffce7568/webp-0.1.0a15.tar.gz" } ] }