ImageMagick – MagickCore, C API: Compare an Image to a Reconstructed Image
Description: ImageMagick is a free and open-source software suite used for editing and manipulating digital images. It provides a versatile set of tools for various image-related tasks. You can use ImageMagick to resize, convert, and apply various transformations to images. It supports a wide range of file formats, including JPEG, PNG, GIF, TIFF, and Ultra HDR.
Keywords: magickcore, c, api:, compare, an, image, to, a, reconstructed, image, ImageMagick, image processing, command-line tool, format conversion, photo editing

# Compare

## CompareImagesCommand

CompareImagesCommand() compares two images and returns the difference between them as a distortion metric and as a new image visually annotating their differences.

The format of the CompareImagesCommand method is:

    MagickBooleanType CompareImagesCommand(ImageInfo *image_info,int argc,
      char **argv,char **metadata,ExceptionInfo *exception)

A description of each parameter follows:

image_info
  the image info.
argc
  the number of elements in the argument vector.
argv
  A text array containing the command line arguments.
metadata
  any metadata is returned here.
exception
  return any errors or warnings in this structure.