docs
evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
Build a command-line image comparison utility that compares two PNG images and reports detailed comparison results with appropriate exit codes for automation workflows.
Your tool should accept command-line arguments in the following format:
node compare-images.js <image1.png> <image2.png> [output-diff.png] [threshold]image1.png (required): Path to the first PNG imageimage2.png (required): Path to the second PNG imageoutput-diff.png (optional): Path where the visual diff image should be savedthreshold (optional): Sensitivity threshold as a number (default: 0.1)The tool must print the following information to the console:
Your tool must use these specific exit codes for automation:
0: Images match (0 mismatched pixels)64: Invalid number of arguments or file reading errors65: Image dimensions don't match66: Images differ (mismatched pixels > 0)Provides pixel-level image comparison functionality.
Provides PNG image encoding and decoding support.