Skip to content

Exact mode, no-comparison-image mode & updated exit codes for diff-image #36

@xyzzy-plugh-plover

Description

@xyzzy-plugh-plover

Would you accept a PR (or separate PRs) for diff-image that:

  1. adds an exact mode that only considers the image data the same if they are exactly the same. Is this already handled by -f 0? (i.e. does 0 fuzz require an exact match?). If not already handled by -f 0, this could be specified by -f x or -x (the latter should either be mutually exclusive with -f, or one should always override the other, or there should be a defined order precedence, like first argument is used or last argument is used)
  2. adds a "no comparison image" mode that does not generate a comparison file, but that will output a message to stdout if the image data for the files is different (and not output anything to stdout if they're the same). If this option is enabled along with "exact mode", then identify -format %# <file> could be run for each argument file & compared, which seems to be faster than the compare. If "exact mode" isn't specified, and if compare can output programmatic values other than equals/not equals (like "10% different", or "491 pixels different"), then that info could be included in the stdout message.
  3. updates the exit codes to be:
    0: both metadata & image data same
    1: metadata different, image data same
    2: metadata same, image data different
    3: both metadata & image data different
    -1: error (could have different negatives for different errors as negative exit codes count down from 255)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions