Debian Codegraph @

examples/images_videos/image_compare/README.md

raw symbols SCIP
1 # Command-line tool to compare 2 images
2
3 Command-line tool to compare sizes and colors of two images. Designed to be a command-line tool usable from scripts, like (bash script):
4
5 ```
6 if image_compare a.png b.png; then
7 echo 'Yes'
8 else
9 echo 'No'
10 fi
11 ```
12
13 Returns exit code 0 (and no output) if succcess (images are the same), or exit code 1 (and desciption of difference on error output) if images differ.
14
15 The images are considered different if they have different size, or if any component of any pixel differs > `Tolerance` (constant in this program).
16
17 Images with different sizes are always detected as "different", we do not bother to check if maybe one image is a shifted, or subset, version of another. It also doesn't bother showing visual differences between images. Try ImageMagick's "compare" tool if you want these features (http://www.imagemagick.org/script/compare.php).
18
19 Using [Castle Game Engine](https://castle-engine.io/).
20
21 ## Building
22
23 Compile by:
24
25 - [CGE editor](https://castle-engine.io/editor). Just use menu items _"Compile"_ or _"Compile And Run"_.
26
27 - Or use [CGE command-line build tool](https://castle-engine.io/build_tool). Run `castle-engine compile` in this directory.
28
29 - Or use [Lazarus](https://www.lazarus-ide.org/). Open in Lazarus `x3d_call_pascal_code_standalone.lpi` file and compile / run from Lazarus. Make sure to first register [CGE Lazarus packages](https://castle-engine.io/lazarus).