Failed to compare images with Imagemagick with robot framework on Windows environment

后端 未结 2 946
说谎
说谎 2021-01-26 15:05

I am using Imagemagick to compare two screenshots in windows environment.

https://blog.codecentric.de/en/2017/09/robot-framework-compare-images-screenshots/

相关标签:
2条回答
  • 2021-01-26 16:00

    If you want to use the "legacy" convert command with ImageMagick v7, you need to click the option during installation of ImageMagick that says "Install legacy tools".

    Or, use the new command which is:

    magick input.png ... output.png
    

    rather than:

    convert input.png ... output.png
    

    So, if you know how to change your configuration variable IMAGE_COMPARATOR_COMMAND to C:\\"Program File"\\ImageMagick-7.0.7-Q16\\magick, you can do it without re-installing ImageMagick.

    0 讨论(0)
  • 2021-01-26 16:01

    ${IMAGE_COMPARATOR_COMMAND} C:/"Program Files"/ImageMagick-7.0.10-Q16/convert.exe REFERENCE TEST -metric RMSE -compare -format "%[distortion]" info:

    replace with above IMAGE_COMPARATOR_COMMAND with suitable changes for your path. It worked for me. Thanks

    0 讨论(0)
提交回复
热议问题