compare(1)

๐Ÿ“ฆ
version 7.1.2.35 ยท 5 versions
, in alpine 3.24, arch rolling, epel 10, fedora 43, fedora 44

๐Ÿ’– compare(1) โ€” the group-chat guide ๐Ÿ’–

okay so bestie, buckle up, this is compare(1) from the General Commands Manual, and it's literally the tool that mathematically AND visually annotates the difference between an image and its reconstruction. she's an overachiever. she does both. periodt. โœจ


โœจ NAME โœจ

compare โ€” mathematically and visually annotate the difference between an image and its reconstruction. ๐Ÿ’…


๐ŸŽ€ SYNOPSIS ๐ŸŽ€

magick compare input-file input-file [options] output-file

๐Ÿฆ‹ OVERVIEW ๐Ÿฆ‹

so the compare program is a member of the ImageMagick(1) suite of tools, she's in the family, she has her people ๐Ÿซถ. you use her to mathematically and visually annotate the difference between an image and its reconstruction.

want more tea about the compare command? point your browser at file:///usr/share/doc/ImageMagick-7/www/compare.html or https://imagemagick.org/script/compare.php. no cap, the docs are right there. ๐ŸŒˆ


๐ŸŒธ DESCRIPTION ๐ŸŒธ

๐Ÿ’œ Image Settings ๐Ÿ’œ

  • -alpha option โ€” the options are on, activate, off, deactivate, set, opaque, copy transparent, extract, background, or shape. pick your fighter ๐Ÿ’…
  • -authenticate value โ€” decrypt image with this password. secretive queen ๐Ÿ”
  • -background color โ€” background color
  • -colorspace type โ€” alternate image colorspace
  • -compose operator โ€” set image composite operator
  • -compress type โ€” type of pixel compression when writing the image
  • -decipher filename โ€” convert cipher pixels to plain pixels
  • -define format:option โ€” define one or more image format options
  • -density geometry โ€” horizontal and vertical density of the image
  • -depth value โ€” image depth
  • -dissimilarity-threshold value โ€” maximum distortion for (sub)image match
  • -encipher filename โ€” convert plain pixels to cipher pixels
  • -extract geometry โ€” extract area from image
  • -format "string" โ€” output formatted image characteristics
  • -fuzz distance โ€” colors within this distance are considered equal
  • -gravity type โ€” horizontal and vertical text placement
  • -identify โ€” identify the format and characteristics of the image
  • -interlace type โ€” type of image interlacing scheme
  • -highlight-color color โ€” emphasize pixel differences with this color. highkey iconic ๐ŸŒŸ
  • -limit type value โ€” pixel cache resource limit
  • -lowlight-color color โ€” de-emphasize pixel differences with this color
  • -metric type โ€” measure differences between images with this metric
  • -monitor โ€” monitor progress
  • -negate โ€” replace each pixel with its complementary color
  • -profile filename โ€” add, delete, or apply an image profile
  • -quality value โ€” JPEG/MIFF/PNG compression level
  • -quiet โ€” suppress all warning messages ๐Ÿคซ
  • -quantize colorspace โ€” reduce colors in this colorspace
  • -read-mask filename โ€” associate a read mask with the image
  • -regard-warnings โ€” pay attention to warning messages
  • -repage geometry โ€” size and location of an image canvas
  • -respect-parentheses โ€” settings remain in effect until parenthesis boundary
  • -sampling-factor geometry โ€” horizontal and vertical sampling factor
  • -seed value โ€” seed a new sequence of pseudo-random numbers
  • -set attribute value โ€” set an image attribute
  • -similarity-threshold value โ€” minimum distortion for (sub)image match
  • -size geometry โ€” width and height of image
  • -subimage-search โ€” search for subimage
  • -synchronize โ€” synchronize image to storage device
  • -taint โ€” declare the image as modified
  • -transparent-color color โ€” transparent color
  • -type type โ€” image type
  • -write-mask filename โ€” associate a write mask with the image
  • -verbose โ€” print detailed information about the image
  • -virtual-pixel method โ€” virtual pixel access method

๐Ÿ”ฅ Image Operators ๐Ÿ”ฅ

  • -auto-orient โ€” automatically orient image. she fixes herself, main character energy ๐Ÿ‘‘
  • -brightness-contrast geometry โ€” improve brightness / contrast of the image
  • -distort method args โ€” distort images according to given method and args
  • -level value โ€” adjust the level of image contrast
  • -resize geometry โ€” resize the image
  • -rotate degrees โ€” apply Paeth rotation to the image
  • -sigmoidal-contrast geometry โ€” lightness rescaling using sigmoidal contrast enhancement
  • -trim โ€” trim image edges

๐Ÿงš Image Channel Operators ๐Ÿงš

  • -separate โ€” separate an image channel into a grayscale image

๐Ÿ“ Image Sequence Operators ๐Ÿ“

  • -crop geometry โ€” cut out a rectangular region of the image
  • -write filename โ€” write images to this file

๐Ÿ’€ Image Stack Operators ๐Ÿ’€

  • -delete indexes โ€” delete the image from the image sequence

โญ Miscellaneous Options โญ

  • -channel mask โ€” set the image channel mask
  • -debug events โ€” display copious debugging information
  • -help โ€” print program options
  • -log format โ€” format of debugging information
  • -list type โ€” print a list of supported option arguments
  • -version โ€” print version information

okay so here's the vibe check on formats, bestie: by default, the image format of file is determined by its magic number ๐Ÿ”ฎ. to specify a particular image format, precede the filename with an image format name and a colon (i.e. ps:image) or specify the image type as the filename suffix (i.e. image.ps). and you can specify file as - for standard input or output. iconic, honestly.

two images are considered similar if their difference according to the specified metric and fuzz value is 0, with the exception of the normalized cross correlation metric (NCC), where two images are considered similar when their normalized cross correlation is 1. the default metric is NCC. ๐Ÿ‘‘

and now the part you actually need to remember, no skipping ๐Ÿ™ˆ: the compare program returns 2 on error, 0 if the images are similar, or a value between 0 and 1 if they are not similar. write that down. tattoo it. it's giving exit status.

๐Ÿ‘€ SEE ALSO ๐Ÿ‘€

ImageMagick(1)


Copyright (C) 1999 ImageMagick Studio LLC. Additional copyrights and licenses apply to this software, see file:///usr/share/doc/ImageMagick-7/www/license.html or https://imagemagick.org/license/


and that's the whole page, bestie!! โœจ this one's from ImageMagick, dated 2009/01/10 01:00:00, and it's filed under compare(1). go forth and diff your pixels, you absolute legend ๐Ÿซถ๐Ÿ’