mirror of https://github.com/vitalif/openscad
fix bug in imagemagick comparison detector
parent
6f0bd738e7
commit
a44f844882
|
@ -537,8 +537,8 @@ else()
|
||||||
set(IM_TEST_FILES "${CMAKE_CURRENT_SOURCE_DIR}/magicktest1.png" "${CMAKE_CURRENT_SOURCE_DIR}/magicktest2.png")
|
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:)
|
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
|
# compare arguments taken from test_cmdline_tool.py
|
||||||
execute_process(COMMAND ${COMPARE_ARGS} OUTPUT_VARIABLE IM_OUT )
|
execute_process(COMMAND ${COMPARE_ARGS} RESULT_VARIABLE IM_RESULT OUTPUT_VARIABLE IM_OUT )
|
||||||
if ( ${IM_OUT} MATCHES "0" )
|
if ( NOT ${IM_RESULT} STREQUAL "0" )
|
||||||
message(STATUS "magicktest1.png and magicktest2.png were incorrectly detected as identical")
|
message(STATUS "magicktest1.png and magicktest2.png were incorrectly detected as identical")
|
||||||
message(STATUS "Using alternative image comparison")
|
message(STATUS "Using alternative image comparison")
|
||||||
set(DIFFPNG 1)
|
set(DIFFPNG 1)
|
||||||
|
|
Loading…
Reference in New Issue