Announcement

Collapse
No announcement yet.

Picture Compare with script and generate report

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Picture Compare with script and generate report

    Hello Experts,

    I'm a newer for using Beyond Compare, I would like to compare two picture and generate report with script. How should I do? Could you help to give a sample, thank you very much!

  • #2
    Script:
    picture-report layout:side-by-side output-to:c:\report.html output-options:html-color c:\file1.png c:\file2.png

    Save the script as a text file, then use the following command at a command prompt to run it:
    "c:\program files\beyond compare 4\bcompare.exe" "@c:\script.txt"

    The @ character tells Beyond Compare to run a file as a script rather than load it for interactive comparison.

    See the "Using Beyond Compare > Scripts" and "Scripting Reference" topics in Beyond Compare's help file for for on scripting.
    Chris K Scooter Software

    Comment


    • #3
      Originally posted by Chris View Post
      Script:
      picture-report layout:side-by-side output-to:c:\report.html output-options:html-color c:\file1.png c:\file2.png

      Save the script as a text file, then use the following command at a command prompt to run it:
      "c:\program files\beyond compare 4\bcompare.exe" "@c:\script.txt"

      The @ character tells Beyond Compare to run a file as a script rather than load it for interactive comparison.

      See the "Using Beyond Compare > Scripts" and "Scripting Reference" topics in Beyond Compare's help file for for on scripting.
      Hi Chris,

      Thanks for your quick and nice reply. I have used Beyond Compare 3, there isn't "Picture-report", it works now after update the latest Beyond Compare 4. I have another questions:

      1. When I compared two png pictures with GUI tool, it shows 583 unimportant difference pixel(s), but when I used the command and script to generate the report, it shows 583 important difference pixel(s), it seems the tolerance value is set to 0 as default. How to set the value of Tolerance for picture compare in script or command.
      2. How to do CRC compare for two pictures with script and generate comparision report?
      3. How to use COMPARE (compare [CRC|binary|rules-based]), could help to give me a example script?

      Thank you very much!
      Last edited by clasp_l; 18-Apr-2016, 02:18 AM.

      Comment


      • #4
        Hello,

        1. Scripting uses the current defaults. If you launch a blank Picture Compare, then change the tolerance and close the window. This will then be used for script.

        2. CRC comparison has to be run from the folder level, or using /quickcompare (outside of scripting) to generate an ErrorLevel of a CRC compare. /QuickCompare is documented in the Command Line Reference Help article. Generating the Report would be a second step, perhaps as an overall Batch file. Would you be looking to see the CRC code? You can generate a folder-report that includes options:column-crc

        3. Compare is used on a select in script, while criteria is to set for the entire compare:
        criteria crc
        load "c:\folder1" "c:\folder2"
        folder-report layout:side-by-side options:column-crc output-to:"c:\bcreport.html" output-options:html-color

        or

        load "c:\folder1" "c:\folder2"
        expand all
        select all
        compare crc
        folder-report layout:side-by-side output-to:"c:\bcreport.html" output-options:html-color
        Aaron P Scooter Software

        Comment

        Working...
        X