yahoo/blink-diff

Error with perceptual mode

stevenvachon opened this issue · 6 comments

TypeError: Cannot read property 'R' of undefined
    at Object._correctGamma (/project/node_modules/blink-diff/index.js:933:21)
    at Object._getColor (/project/node_modules/blink-diff/index.js:909:17)
    at Object._pixelCompare (/project/node_modules/blink-diff/index.js:1119:19)
    at Object._compare (/project/node_modules/blink-diff/index.js:1191:29)
    at Object.<anonymous> (/project/node_modules/blink-diff/index.js:432:18)
    at /project/node_modules/promise/lib/core.js:33:15
    at flush (/project/node_modules/asap/asap.js:27:13)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)
new BlinkDiff({
  hideShift: true,  // hide anti-aliasing differences
  imageA: imageA,
  imageB: imageB,
  perceptual: true
})

I will look into this tonight. But, if you could supply me more data.

Does this work when you do perceptual: false? Do you have an example image?

It works with perceptual not defined, which defaults to false, so I think it's safe to answer "yes".

All of my images threw the same error, but here're two:
buttons-linux
buttons-osx

This is an easy fix, but there is no work-around. Needing to wait until it is merged and pushed as new version to NPM.

You can try using "https://github.com/preceptorjs/blink-diff" until then.

Thanks!

Still see this issue with version 1.0.13. Is this fixed? Thanks.