PDA

View Full Version : scripting: multiple picture compares


kkwon
18-Aug-2011, 07:05 AM
Hi,
If I have a script that does comparison of two files it will compare properly. But if I have a script than does multiple compares of two files it will not provide any compare differences.

For example
bc.bat:
BCompare.exe @bcscript1.txt TestPattern_STL-137.bmp TestImage1.bmp report2.html
BCompare.exe @bcscript1.txt TestPattern_STL-107.bmp TestImage1.bmp report3.html
BCompare.exe @bcscript1.txt TestPattern_STL-137.bmp portcameratestpattern_config3.bmp report4.html
BCompare.exe @bcscript1.txt TestPattern_STL-137.bmp portcameratestpattern_config3_2.bmp report5.html
BCompare.exe @bcscript1.txt TestPattern_STL-137.bmp portcameratestpattern_config3_3.bmp report6.html

bcscript1.txt:
picture-report layout:side-by-side &
output-to:%3 output-options:html-color %1 %2

Is there a bug with scripting or is there a problem with the batch or script file?

Regards,
Ken

Aaron
18-Aug-2011, 10:06 AM
Hello,

The above BC script and bat file look ok. If you open each pair of files in BC3's Picture Compare, and manually generate the html report from the Session menu -> Picture Compare Report, with the default options, do the reports generate as you expect or do they have issues?

What is the problem? Is the report blank?

If you type this on the command line, does the report generate?:
BCompare.exe @bcscript1.txt TestPattern_STL-137.bmp TestImage1.bmp report2.html

If you place this single line in a bat file, does the report generate:
BCompare.exe @bcscript1.txt TestPattern_STL-137.bmp TestImage1.bmp report2.html

kkwon
19-Aug-2011, 06:23 AM
If more than one compare is done in the batch file, each compare results in a report being generated, but the difference is blank when it should not be.
If the batch file has one compare, the report is generated and the difference is correct.

Regards,
Ken

kkwon
19-Aug-2011, 09:52 AM
Hi Aaron,
Have done when you requested, and in both cases the reports are generated with the proper difference.

If two compares are in the batch file, it seems to generate reports with proper differences. But if three or more compares are in the batch file, all generated reports show no differences.

Ken

Aaron
19-Aug-2011, 02:42 PM
Hello,

I think I know what you are running into. The BCImages folder is used to store all images, including the diff. Since all of your HTML reports are in the same directory, they'd have the same BCImages subdirectory (which would have its info overridden).

How does this work if you make a subdirectory for each report? Report1\report1.html

kkwon
22-Aug-2011, 08:39 AM
Hi Aaron,
Yes, specifying a difference directory for each report corrects the issue.

Thanks,
Ken