fix bug in imagemagick comparison detector

master
don bright 2014-06-25 20:06:27 -07:00 committed by Marius Kintel
parent 6f0bd738e7
commit a44f844882
1 changed files with 2 additions and 2 deletions

View File

@ -537,8 +537,8 @@ else()
set(IM_TEST_FILES "${CMAKE_CURRENT_SOURCE_DIR}/magicktest1.png" "${CMAKE_CURRENT_SOURCE_DIR}/magicktest2.png")
set(COMPARE_ARGS ${IMAGE_COMPARE_EXECUTABLE} ${IM_TEST_FILES} -alpha Off -compose difference -composite -threshold 10% -morphology Erode Square -format %[fx:w*h*mean] info:)
# compare arguments taken from test_cmdline_tool.py
execute_process(COMMAND ${COMPARE_ARGS} OUTPUT_VARIABLE IM_OUT )
if ( ${IM_OUT} MATCHES "0" )
execute_process(COMMAND ${COMPARE_ARGS} RESULT_VARIABLE IM_RESULT OUTPUT_VARIABLE IM_OUT )
if ( NOT ${IM_RESULT} STREQUAL "0" )
message(STATUS "magicktest1.png and magicktest2.png were incorrectly detected as identical")
message(STATUS "Using alternative image comparison")
set(DIFFPNG 1)