bbc / wraith

Wraith — A responsive screenshot comparison tool

Home Page:http://bbc-news.github.io/wraith/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to create diff image.

anandshirkande opened this issue · comments

Hi Team,

I running following command: wraith capture configs/capture.yaml

I am getting current and new images for both domains. But I am not receiving diff image in result. There is no image in thumbnail folders.
I am using 4.0.1 version.

I am getting below error:

COMPARING IMAGES
Comparing shots/home/1280_phantomjs_current.png and shots/home/1280_phantomjs_new.png
Comparing shots/home/1024_phantomjs_current.png and shots/home/1024_phantomjs_new.png
Saved diff
Saved diff
GENERATING THUMBNAILS
convert: no decode delegate for this image format PNG' @ error/constitute.c/ReadImage/509. convert: no images defined shots/thumbnails/home/1024_phantomjs_new.png' @ error/convert.c/ConvertImageCommand/3254.
convert: no decode delegate for this image format PNG' @ error/constitute.c/ReadImage/509. convert: no images defined shots/thumbnails/home/1024_phantomjs_current.png' @ error/convert.c/ConvertImageCommand/3254.
convert: no decode delegate for this image format PNG' @ error/constitute.c/ReadImage/509. convert: no images defined shots/thumbnails/home/1280_phantomjs_new.png' @ error/convert.c/ConvertImageCommand/3254.
convert: no decode delegate for this image format PNG' @ error/constitute.c/ReadImage/509. convert: no images defined shots/thumbnails/home/1280_phantomjs_current.png' @ error/convert.c/ConvertImageCommand/3254.
GENERATING GALLERY
Gallery generated
WARN: Failures detected:
WARN: Unable to create a diff image for home
WARN: Unable to create a diff image for home


Reporting a problem? Please describe the issue above, and complete the following checklist so that we can help you more quickly.

Issue checklist:

  • [Yes ] I have validated my config file against YAML Validator to make sure it is valid YAML.

  • [Yes ] I have run the wraith info command and pasted the output below:

paste results here
tglm-728:ImageMagick-7.0.5-4 shirkandea$ wraith info
DEBUG: #################################################
DEBUG:   Command run:        info
DEBUG:   Wraith version:     4.0.1
DEBUG:   Ruby version:       ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin15]
DEBUG:   ImageMagick:        Version: ImageMagick 7.0.5-4 Q16 x86_64 2017-04-12 http://www.imagemagick.org
DEBUG:   PhantomJS version:  2.1.1
DEBUG:   CasperJS version:   CasperJS not installed
DEBUG: #################################################
  • [ Yes] I have run the command in verbose mode (by adding verbose: true to my config) and pasted the output below:
paste results here
  • I have pasted the contents of my config file below:
paste config here

##############################################################
##############################################################
# This is an example configuration provided by Wraith.
# Feel free to amend for your own requirements.
# ---
# This particular config is intended to demonstrate how
# to use Wraith in 'capture' mode, which is best suited to
# comparing a test and live version of the same website.
#
# `wraith capture capture.yaml`
#
##############################################################
##############################################################

# (required) The engine to run Wraith with. Examples: 'phantomjs', 'casperjs', 'slimerjs'
browser: "phantomjs"

# (required) The domains to take screenshots of.
domains:
  current:  "http://www.telegraph.co.uk"
  new:      "http://staging.telegraph.co.uk/"

# (required) The paths to capture. All paths should exist for both of the domains specified above.
paths:
  home:     /
  

# (required) Screen widths (and optional height) to resize the browser to before taking the screenshot.
screen_widths:
  - 1024
  - 1280

# (optional) JavaScript file to execute before taking screenshot of every path. Default: nil
before_capture: 'javascript/disable_javascript--phantom.js'

# (required) The directory that your screenshots will be stored in
directory: 'shots'

# (required) Amount of fuzz ImageMagick will use when comparing images. A higher fuzz makes the comparison less strict.
fuzz: '10%'

# (optional) The maximum acceptable level of difference (in %) between two images before Wraith reports a failure. Default: 0
threshold: 5

# (optional) Specify the template (and generated thumbnail sizes) for the gallery output.
gallery:
  template: 'slideshow_template' # Examples: 'basic_template' (default), 'slideshow_template'
  thumb_width:  200
  thumb_height: 200

# (optional) Choose which results are displayed in the gallery, and in what order. Default: alphanumeric
# Options:
#   alphanumeric - all paths (with or without a difference) are shown, sorted by path
#   diffs_first - all paths (with or without a difference) are shown, sorted by difference size (largest first)
#   diffs_only - only paths with a difference are shown, sorted by difference size (largest first)
# Note: different screen widths are always grouped together.
mode: diffs_first
verbose: true


Hi @anandshirkande - this is a known issue - Wraith does not work with ImageMagick v7 (see #459).

Please downgrade to ImageMagick v6 to get it working with Wraith.

Thanks Chris.

Anyways I managed to resolved issue. Issue was with decode delegate for PNG images. I just installed libpng delegate and linked them before installing ImageMagick. That resolved my issue.