{
"info": {
"author": "Zachary Voase",
"author_email": "z@zacharyvoase.com",
"bugtrack_url": null,
"classifiers": [],
"description": "pdiffer\n=======\n\nA Python interface to the\n```perceptualdiff`` `__ tool, plus\nhelpers for making pdiff-based assertions in tests. By\n`Zack `__.\n\nInstall using pip:\n\n::\n\n pip install pdiffer\n\nYou need to have ``perceptualdiff`` installed somewhere on your computer\nfor this library to work.\n\nUsage\n-----\n\nCreate your ``PDiffer`` instance, optionally specifying a path to the\nbinary:\n\n.. code:: python\n\n from pdiffer import PDiffer\n pdiff = PDiffer(bin='/usr/local/bin/perceptualdiff')\n # or, just\n from pdiffer import pdiff\n\nDiff two images by pathname:\n\n.. code:: python\n\n result = pdiff('image1.png', 'image2.png')\n\nIf the images are similar enough, ``result`` will be falsy; that is, the\nfollowing code will print 'SAME':\n\n.. code:: pycon\n\n >>> if result:\n ... print 'DIFFERENT'\n ... else:\n ... print 'SAME'\n SAME\n\nYou can get the string output of the command by just calling\n``unicode``/``str`` (or even ``print``) on the result:\n\n.. code:: pycon\n\n >>> print(result)\n PASS: Images are binary identical\n\nIf the images are different, you'll see something else:\n\n.. code:: pycon\n\n >>> result = pdiff('image1.png', 'image3.png')\n >>> if result:\n ... print(result)\n FAIL: Image dimensions do not match\n\nParameters\n~~~~~~~~~~\n\nThere are a few parameters you can customize in the pdiff invocation:\n\n.. code:: python\n\n pdiff('image1.png', 'image2.png',\n fov=65,\n threshold=40,\n gamma=2.2,\n luminance=100,\n luminanceonly=True,\n colorfactor=1.0,\n downsample=0,\n output='o.ppm')\n\nDocumentation on all of these options can be found by running\n``perceptualdiff -help``.\n\nTest Assertions\n~~~~~~~~~~~~~~~\n\nPerceptualDiff is mostly useful in automated testing, and therefore some\nbasic assertions are provided for checking image similarity (under both\nPEP8 and camelCase names):\n\n.. code:: python\n\n from pdiffer import assertImagesSimilar, assertImagesDifferent\n from pdiffer import assert_images_similar, assert_images_different\n\n\n def test_something():\n assert_images_different('image1.png', 'image2.png')\n assert_images_similar('image1.png', 'image3.png')\n\nThese assertions take parameters just like ``pdiff()``, e.g.:\n\n.. code:: python\n\n assert_images_different('image1.png', 'image2.png', fov=89.9, threshold=40)\n\nUnlicense\n---------\n\nThis is free and unencumbered software released into the public domain.\n\nAnyone is free to copy, modify, publish, use, compile, sell, or\ndistribute this software, either in source code form or as a compiled\nbinary, for any purpose, commercial or non-commercial, and by any means.\n\nIn jurisdictions that recognize copyright laws, the author or authors of\nthis software dedicate any and all copyright interest in the software to\nthe public domain. We make this dedication for the benefit of the public\nat large and to the detriment of our heirs and successors. We intend\nthis dedication to be an overt act of relinquishment in perpetuity of\nall present and future rights to this software under copyright law.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\nFor more information, please refer to http://unlicense.org/",
"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/zacharyvoase/pdiffer",
"keywords": null,
"license": "UNKNOWN",
"maintainer": null,
"maintainer_email": null,
"name": "pdiffer",
"package_url": "https://pypi.org/project/pdiffer/",
"platform": "UNKNOWN",
"project_url": "https://pypi.org/project/pdiffer/",
"project_urls": {
"Download": "UNKNOWN",
"Homepage": "https://github.com/zacharyvoase/pdiffer"
},
"release_url": "https://pypi.org/project/pdiffer/0.0.3/",
"requires_dist": null,
"requires_python": null,
"summary": "A Python interface to the PerceptualDiff tool.",
"version": "0.0.3"
},
"last_serial": 796137,
"releases": {
"0.0.1": [
{
"comment_text": "",
"digests": {
"md5": "4e5437edd9d9eaf738b8ca1e0fd954cd",
"sha256": "9d51570e7861efbbbb9c71bbd832853e9dbb97ed8d03f2c48640995856347c8b"
},
"downloads": -1,
"filename": "pdiffer-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "4e5437edd9d9eaf738b8ca1e0fd954cd",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 2903,
"upload_time": "2013-04-05T15:42:04",
"url": "https://files.pythonhosted.org/packages/ec/fa/e0aace2605c4f14fbcb11d4319f4a9ce6808f50c538884185f4bde2b573a/pdiffer-0.0.1.tar.gz"
}
],
"0.0.2": [
{
"comment_text": "",
"digests": {
"md5": "247bc0409d473d5f014d069bb1f1a642",
"sha256": "62f969111f0e8ca0d5a2d93182214acef3d79b70021597a88b9e300cb0745599"
},
"downloads": -1,
"filename": "pdiffer-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "247bc0409d473d5f014d069bb1f1a642",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3218,
"upload_time": "2013-04-05T15:46:42",
"url": "https://files.pythonhosted.org/packages/46/06/bca0743e674e61edcc5a940c1f6bb46b1bedd04f5b770f8d93944cc775b6/pdiffer-0.0.2.tar.gz"
}
],
"0.0.3": [
{
"comment_text": "",
"digests": {
"md5": "ffdf9d510f9f5959ce3d80c152838541",
"sha256": "2e7c43199aec66f924a019c2fc90e3be0eb8fd358f49ad71f23ed358f1400756"
},
"downloads": -1,
"filename": "pdiffer-0.0.3.tar.gz",
"has_sig": false,
"md5_digest": "ffdf9d510f9f5959ce3d80c152838541",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3317,
"upload_time": "2013-04-05T16:25:24",
"url": "https://files.pythonhosted.org/packages/a6/16/862a03a1027085ea6114f5fcf8b061f12c1c0b4deca2ee3f04b31ac9aac4/pdiffer-0.0.3.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "ffdf9d510f9f5959ce3d80c152838541",
"sha256": "2e7c43199aec66f924a019c2fc90e3be0eb8fd358f49ad71f23ed358f1400756"
},
"downloads": -1,
"filename": "pdiffer-0.0.3.tar.gz",
"has_sig": false,
"md5_digest": "ffdf9d510f9f5959ce3d80c152838541",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3317,
"upload_time": "2013-04-05T16:25:24",
"url": "https://files.pythonhosted.org/packages/a6/16/862a03a1027085ea6114f5fcf8b061f12c1c0b4deca2ee3f04b31ac9aac4/pdiffer-0.0.3.tar.gz"
}
]
}