imgdiff


Nameimgdiff JSON
Version 1.8.0 PyPI version JSON
download
home_pagehttps://github.com/mgedmin/imgdiff
SummaryPresent two images side-by-side for visual comparison
upload_time2024-10-09 12:26:25
maintainerNone
docs_urlhttps://pythonhosted.org/imgdiff/
authorMarius Gedminas
requires_python>=3.7
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            imgdiff
=======

.. image:: https://github.com/mgedmin/imgdiff/workflows/build/badge.svg?branch=master
    :target: https://github.com/mgedmin/imgdiff/actions

.. image:: https://coveralls.io/repos/mgedmin/imgdiff/badge.svg?branch=master
    :target: https://coveralls.io/r/mgedmin/imgdiff

A command-line tool that combines two pictures into a single, larger
one, and opens a GUI window (provided by the Python Imaging Library)
or an external image viewer.

You could use it with a version control tool, e.g. ::

  bzr diff *.png --using=imgdiff

or ::

  bzr diff *.png --using='imgdiff --eog -H'


Installation
------------

``pip install imgdiff`` or `download it from PyPI
<https://pypi.python.org/pypi/imgdiff>`_.


Usage
-----

Run ``imgdiff --help`` to see this help message::

    Usage: imgdiff [options] image1 image2

    Compare two images side-by-side

    Options:
      -h, --help            show this help message and exit
      -o OUTFILE            write the combined image to a file
      --viewer=COMMAND      use an external image viewer (default: builtin)
      --eog                 use Eye of Gnome (same as --viewer eog)
      --grace=SECONDS       seconds to wait before removing temporary file when
                            using an external viewer (default: 1.0)
      -H, --highlight       highlight differences (EXPERIMENTAL)
      -S, --smart-highlight
                            highlight differences in a smarter way (EXPERIMENTAL)
      --opacity=OPACITY     minimum opacity for highlighting (default 64)
      --timeout=TIMEOUT     skip highlighting if it takes too long (default: 10
                            seconds)
      --auto                pick orientation automatically (default)
      --lr, --left-right    force orientation to left-and-right
      --tb, --top-bottom    force orientation to top-and-bottom
      --bgcolor=RGB         background color (default: fff)
      --sepcolor=RGB        separator line color (default: ccc)
      --spacing=N           spacing between images (default: 3 pixels)
      --border=N            border around images (default: 0 pixels)


Output Examples
---------------

First example::

    imgdiff set1/42.png set3/

.. figure:: https://pythonhosted.org/imgdiff/example1.png
   :alt: example #1

Here the images are wide and short, so imgdiff decided to put them one above
the other.

Same example, with highlighting enabled::

    imgdiff set1/42.png set3/ -H

.. figure:: https://pythonhosted.org/imgdiff/example2.png
   :alt: example #2

You can see that it doesn't work very well, although it can produce nice
results in simpler cases::

    imgdiff set1/42.png set2/ -H

.. figure:: https://pythonhosted.org/imgdiff/example3.png
   :alt: example #3


Support and Development
-----------------------

The source code can be found in this Git repository:
https://github.com/mgedmin/imgdiff.

To check it out, use ``git clone https://github.com/mgedmin/imgdiff``.

Report bugs at https://github.com/mgedmin/imgdiff/issues.



Changes
=======

1.8.0 (2024-10-09)
------------------

- Add support for Python 3.8, 3.9, 3.10, 3.11, 3.12, and 3.13.

- Drop support for Python 2.7, 3.5 and 3.6.


1.7.1 (2019-04-23)
------------------

- Claim Python 3.6 and 3.7 support (no code changes required).

- Drop Python 3.3 and 3.4 support.


1.7.0 (2016-09-17)
------------------

- Clarify the help message for the ``--opacity`` option.

- Add Python 3.5 support.

- Drop Python 2.6 and 3.2 support.


1.6.0 (2014-12-01)
------------------

- Add Python 3 support.

- Make the --timeout option actually work.

- Drop the --selftest option.  Add a real test suite with 100% coverage
  (which actually means little, since these are smoke tests that don't
  inspect the results for correctness.)


1.5.0 (2013-08-11)
------------------

- Suppress progress output if stderr is not a terminal.

- Make it possible to abort --highligh/--smart-highlight logic by pressing ^C.

- Abort --highlight/--smart-highlight logic if it takes longer than 10 seconds
  (timeout changeable with --timeout; use 0 to turn it off).


1.4.1 (2013-08-09)
------------------

- Depend on Pillow instead of PIL.

- Moved to GitHub.


1.4.0 (2010-12-19)
------------------

- Accepts directory names: ``imgdiff dir1/img.png dir2/``.

- Centers images relative to each other if they have different width/height.

- Automatic orientation (--auto) uses the golden ratio (1:1.618) as its goal
  for desired height:width instead of a 1:1 square.

- New experimental options: --highlight (-H) and --smart-highlight (-S).
  These highlight areas that are different and fade out areas that are
  similar.  Or at least they try.

- New options for tweaking the output: --bgcolor, --sepcolor, --spacing,
  --border, --opacity.

- New option: --eog as alias for --viewer eog, but shorter.  Guess what
  desktop environment I'm using.  ;-)

- A puny "test suite", runnable with imgdiff --selftest.

- Better source code documentation via docstrings.


1.3.0 (2010-12-18)
------------------

- First public release.  Options supported: -o, --viewer, --grace, --auto,
  --lr, --tb, --help.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/mgedmin/imgdiff",
    "name": "imgdiff",
    "maintainer": null,
    "docs_url": "https://pythonhosted.org/imgdiff/",
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": null,
    "author": "Marius Gedminas",
    "author_email": "marius@gedmin.as",
    "download_url": "https://files.pythonhosted.org/packages/f0/a3/dafd8c9b51673f520fd4d6288bb167287af494821a5d60503bd6bb09c642/imgdiff-1.8.0.tar.gz",
    "platform": null,
    "description": "imgdiff\n=======\n\n.. image:: https://github.com/mgedmin/imgdiff/workflows/build/badge.svg?branch=master\n    :target: https://github.com/mgedmin/imgdiff/actions\n\n.. image:: https://coveralls.io/repos/mgedmin/imgdiff/badge.svg?branch=master\n    :target: https://coveralls.io/r/mgedmin/imgdiff\n\nA command-line tool that combines two pictures into a single, larger\none, and opens a GUI window (provided by the Python Imaging Library)\nor an external image viewer.\n\nYou could use it with a version control tool, e.g. ::\n\n  bzr diff *.png --using=imgdiff\n\nor ::\n\n  bzr diff *.png --using='imgdiff --eog -H'\n\n\nInstallation\n------------\n\n``pip install imgdiff`` or `download it from PyPI\n<https://pypi.python.org/pypi/imgdiff>`_.\n\n\nUsage\n-----\n\nRun ``imgdiff --help`` to see this help message::\n\n    Usage: imgdiff [options] image1 image2\n\n    Compare two images side-by-side\n\n    Options:\n      -h, --help            show this help message and exit\n      -o OUTFILE            write the combined image to a file\n      --viewer=COMMAND      use an external image viewer (default: builtin)\n      --eog                 use Eye of Gnome (same as --viewer eog)\n      --grace=SECONDS       seconds to wait before removing temporary file when\n                            using an external viewer (default: 1.0)\n      -H, --highlight       highlight differences (EXPERIMENTAL)\n      -S, --smart-highlight\n                            highlight differences in a smarter way (EXPERIMENTAL)\n      --opacity=OPACITY     minimum opacity for highlighting (default 64)\n      --timeout=TIMEOUT     skip highlighting if it takes too long (default: 10\n                            seconds)\n      --auto                pick orientation automatically (default)\n      --lr, --left-right    force orientation to left-and-right\n      --tb, --top-bottom    force orientation to top-and-bottom\n      --bgcolor=RGB         background color (default: fff)\n      --sepcolor=RGB        separator line color (default: ccc)\n      --spacing=N           spacing between images (default: 3 pixels)\n      --border=N            border around images (default: 0 pixels)\n\n\nOutput Examples\n---------------\n\nFirst example::\n\n    imgdiff set1/42.png set3/\n\n.. figure:: https://pythonhosted.org/imgdiff/example1.png\n   :alt: example #1\n\nHere the images are wide and short, so imgdiff decided to put them one above\nthe other.\n\nSame example, with highlighting enabled::\n\n    imgdiff set1/42.png set3/ -H\n\n.. figure:: https://pythonhosted.org/imgdiff/example2.png\n   :alt: example #2\n\nYou can see that it doesn't work very well, although it can produce nice\nresults in simpler cases::\n\n    imgdiff set1/42.png set2/ -H\n\n.. figure:: https://pythonhosted.org/imgdiff/example3.png\n   :alt: example #3\n\n\nSupport and Development\n-----------------------\n\nThe source code can be found in this Git repository:\nhttps://github.com/mgedmin/imgdiff.\n\nTo check it out, use ``git clone https://github.com/mgedmin/imgdiff``.\n\nReport bugs at https://github.com/mgedmin/imgdiff/issues.\n\n\n\nChanges\n=======\n\n1.8.0 (2024-10-09)\n------------------\n\n- Add support for Python 3.8, 3.9, 3.10, 3.11, 3.12, and 3.13.\n\n- Drop support for Python 2.7, 3.5 and 3.6.\n\n\n1.7.1 (2019-04-23)\n------------------\n\n- Claim Python 3.6 and 3.7 support (no code changes required).\n\n- Drop Python 3.3 and 3.4 support.\n\n\n1.7.0 (2016-09-17)\n------------------\n\n- Clarify the help message for the ``--opacity`` option.\n\n- Add Python 3.5 support.\n\n- Drop Python 2.6 and 3.2 support.\n\n\n1.6.0 (2014-12-01)\n------------------\n\n- Add Python 3 support.\n\n- Make the --timeout option actually work.\n\n- Drop the --selftest option.  Add a real test suite with 100% coverage\n  (which actually means little, since these are smoke tests that don't\n  inspect the results for correctness.)\n\n\n1.5.0 (2013-08-11)\n------------------\n\n- Suppress progress output if stderr is not a terminal.\n\n- Make it possible to abort --highligh/--smart-highlight logic by pressing ^C.\n\n- Abort --highlight/--smart-highlight logic if it takes longer than 10 seconds\n  (timeout changeable with --timeout; use 0 to turn it off).\n\n\n1.4.1 (2013-08-09)\n------------------\n\n- Depend on Pillow instead of PIL.\n\n- Moved to GitHub.\n\n\n1.4.0 (2010-12-19)\n------------------\n\n- Accepts directory names: ``imgdiff dir1/img.png dir2/``.\n\n- Centers images relative to each other if they have different width/height.\n\n- Automatic orientation (--auto) uses the golden ratio (1:1.618) as its goal\n  for desired height:width instead of a 1:1 square.\n\n- New experimental options: --highlight (-H) and --smart-highlight (-S).\n  These highlight areas that are different and fade out areas that are\n  similar.  Or at least they try.\n\n- New options for tweaking the output: --bgcolor, --sepcolor, --spacing,\n  --border, --opacity.\n\n- New option: --eog as alias for --viewer eog, but shorter.  Guess what\n  desktop environment I'm using.  ;-)\n\n- A puny \"test suite\", runnable with imgdiff --selftest.\n\n- Better source code documentation via docstrings.\n\n\n1.3.0 (2010-12-18)\n------------------\n\n- First public release.  Options supported: -o, --viewer, --grace, --auto,\n  --lr, --tb, --help.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Present two images side-by-side for visual comparison",
    "version": "1.8.0",
    "project_urls": {
        "Homepage": "https://github.com/mgedmin/imgdiff"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9f1182887197b4de962726a9fd83832a1ef3190e41c68c42474e72f61d173852",
                "md5": "d84e29477071bd2a904e307d5a6cfcae",
                "sha256": "10b351e52d6fe2c8ecd586d3cf655445afa2fb0fea3aa40ac84776c8a58310f9"
            },
            "downloads": -1,
            "filename": "imgdiff-1.8.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d84e29477071bd2a904e307d5a6cfcae",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 10358,
            "upload_time": "2024-10-09T12:26:21",
            "upload_time_iso_8601": "2024-10-09T12:26:21.076094Z",
            "url": "https://files.pythonhosted.org/packages/9f/11/82887197b4de962726a9fd83832a1ef3190e41c68c42474e72f61d173852/imgdiff-1.8.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f0a3dafd8c9b51673f520fd4d6288bb167287af494821a5d60503bd6bb09c642",
                "md5": "b0b432bb8b41088b095317e384150788",
                "sha256": "ee8d6da71fe74ca27cc1086a133e91028a7dea7690c09d37077dcda0150f4677"
            },
            "downloads": -1,
            "filename": "imgdiff-1.8.0.tar.gz",
            "has_sig": false,
            "md5_digest": "b0b432bb8b41088b095317e384150788",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 1351317,
            "upload_time": "2024-10-09T12:26:25",
            "upload_time_iso_8601": "2024-10-09T12:26:25.743366Z",
            "url": "https://files.pythonhosted.org/packages/f0/a3/dafd8c9b51673f520fd4d6288bb167287af494821a5d60503bd6bb09c642/imgdiff-1.8.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-09 12:26:25",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mgedmin",
    "github_project": "imgdiff",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "appveyor": true,
    "tox": true,
    "lcname": "imgdiff"
}
        
Elapsed time: 0.32079s