比较

命名

compare - 比较两张图.

菜单

  • 概要
  • 描述
  • 示例
  • 选项

概要

gm compare [ options ... ] reference-image [ options ... ] compare-image [ options ... ]

描述

compare compares two similar images using a specified statistical method (see -metric) and/or by writing a difference image (-file), with the altered pixels annotated using a specified method (see -highlight-style) and color (see -highlight-color).

Reference-image is the original image and compare-image is the (possibly) altered version, which should have the same dimensions as reference-image.

示例

To compare two images using Mean Square Error (MSE) statistical analysis use:

    compare -metric mse original.miff compare.miff

To create an annotated difference image use:

    compare -highlight-style assign -highlight-color purple -file diff.miff original.miff compare.miff

选项

Options are processed in command line order. Any option you specify on the command line remains in effect only for the image that follows. All options are reset to their default values after each image is read.

For a more detailed description of each option, see Options, above. GraphicsMagick(1).

-authenticate <string>

使用密码解密图片

-colorspace <value>

色隙类型

-debug <events>

启用调试打印输出

-define <key>{=<value>},...

add coder/decoder specific options

-density <width>x<height>

horizontal and vertical resolution in pixels of the image

-depth <value>

图像深度

-display <host:display[.screen]>

specifies the X server to contact

-endian <type>

specify endianness (MSB, LSB, or Native) of image

-file <filename>

write annotated difference image to file

-help

print usage instructions

-highlight-color <color>

pixel annotation color

-highlight-style <style>

pixel annotation style

-interlace <type>

the type of interlacing scheme

-limit <type> <value>

Disk, File, Map, Memory, Pixels, Width, Height or Threads resource limit

-log <string>

Specify format for debug log

-matte

store matte channel if the image has one

-maximum-error <limit>

specifies the maximum amount of total image error

-metric <metric>

比较规 (MAE, MSE, PAE, PSNR, RMSE)

-monitor

显示进度提示

-sampling-factor <horizontal_factor>x<vertical_factor>

chroma subsampling factors

-size <width>x<height>{+offset}

图像的宽度和高度

-type <type>

图像类型

-verbose

打印图片详情

-version

打印 GraphicsMagick 版本字符

查看选项详情, 查看 GraphicsMagick(1) 选项.