manpagez: man pages & more
man imagdiff(1)
Home | html | info | man
imagdiff(1)                                                        imagdiff(1)




NAME

       imagdiff  -  compares two image files and writes differences to a third
       file file.


SYNOPSIS

       imagdiff [-h(elp)] [-f fuzz_dist] [-m mode] oldfile newfile deltafile


DESCRIPTION

       imagdiff reads in any two image files readable by Imlib2 and write  out
       a  "delta"  image  file that represents the differences between the two
       files.


OPTIONS

       -h     Print help and quit.

       -f fuzz_dist
              When performing a grayscale difference analysis, any pixel  val-
              ues  within  the  distance specified by -f option are considered
              equal.  This option has no effect on a color  difference  analy-
              sis.  The default value is 1.

       -m mode
              Set  of  the  mode of the difference analysis.  At present, five
              modes are available, as described in  the  MODES  section.   The
              default mode is 1.


MODES

       1      Grayscale:   In  this  mode,  both input images are converted to
              grayscale.  Any pixels that are darker (when  comparing  old  to
              new)  are  highlighted in BLUE, and any pixels that are brighter
              are highlighted in RED.  [On a B&W drawing with  a  white  back-
              ground, this results in additions being highlighted in BLUE, and
              subtractions being highlighted in RED.] If one of the two  input
              images  is missing, a blank all-white image will be created as a
              substitute.

       2      Grayscale (lightened):  This works much like the Grayscale anal-
              ysis  of  mode  1,  except that all unchanged pixels are shifted
              halfway towards white.  This makes it easier to identify changes
              on an image where the background is predominantly white.  If one
              of the two input images is missing, a blank all-white image will
              be created as a substitute.

       3      Grayscale (darkened):  This works much like the Grayscale analy-
              sis of mode 1, except that  all  unchanged  pixels  are  shifted
              halfway towards black.  This makes it easier to identify changes
              on an image where the background is predominantly black.  If one
              of the two input images is missing, a blank all-black image will
              be created as a substitute.

       4      Color:  Here, the differences between the two  images  are  com-
              puted  on  a  per-RED,  per-GREEN,  and  per-BLUE  basis and are
              shifted and scaled such that unchanged pixels will  show  up  as
              50%  gray.   If  one of the two input images is missing, a blank
              50% gray image will be created as a substitute.

       5      Color (stretched):  Again, differences between  the  two  images
              are  computed  on  a  per-channel and are shifted that unchanged
              pixels will show up as 50% gray, but here the scaling is  maxim-
              imized to emphasize differences.  If one of the two input images
              is missing, a blank 50% gray image will be created as a  substi-
              tute.


NOTES

       The  compare and gm compare utilities (found within the ImageMagick and
       GraphicsMagick suites, respectively) can be utilized to perform a simi-
       lar analysis.  However, imagdiff has been optimized for black-and-white
       images and runs faster because of the underlying Imlib2 engine.


CAVEATS

       Metadata found in the input files (including resolution information) is
       discarded.   Also,  the Imlib2 export routine makes no attempts at col-
       orspace reduction or otherwise optimizing the output image.  If  saving
       to  a  PNG  file, consider using pngrecolor (or even opt-png) to reduce
       the filesize.


SEE ALSO

       compare(1), gm(1), opt-png(1), pngrecolor(1)


COPYRIGHT

       Copyright (C) 2019-2020 by Brian Lindholm. This program is  free  soft-
       ware; you can use it, redistribute it, and/or modify it under the terms
       of the GNU General Public License as published  by  the  Free  Software
       Foundation; either version 3, or (at your option) any later version.

       This  program  is  distributed  in the hope that it will be useful, but
       WITHOUT ANY  WARRANTY;  without  even  the  implied  warranty  of  MER-
       CHANTABILITY  or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
       Public License for more details.



littleutils                       2020 Oct 08                      imagdiff(1)

littleutils 1.2.3 - Generated Mon Nov 30 18:50:57 CST 2020
© manpagez.com 2000-2024
Individual documents may contain additional copyright information.