Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

Error with perceptual mode #30

Open
stevenvachon opened this issue Sep 19, 2016 · 6 comments
Open

Error with perceptual mode #30

stevenvachon opened this issue Sep 19, 2016 · 6 comments

Comments

@stevenvachon
Copy link

stevenvachon commented Sep 19, 2016

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
})
@marcelerz
Copy link
Contributor

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?

@stevenvachon
Copy link
Author

stevenvachon commented Sep 19, 2016

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

@marcelerz
Copy link
Contributor

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.

@marcelerz
Copy link
Contributor

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

@stevenvachon
Copy link
Author

Thanks!

@gaurav517
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants