Skip to content

Error: failed to run: img.toBuffer() function #483

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
DDavo opened this issue Jan 24, 2017 · 3 comments
Open

Error: failed to run: img.toBuffer() function #483

DDavo opened this issue Jan 24, 2017 · 3 comments

Comments

@DDavo
Copy link

DDavo commented Jan 24, 2017

I have the next code:

`
cv.readImage(path, function(err, img){

  if (err) return resp.end(err.stack);

  if (img.width() < 1 || img.height() < 1) return resp.end('Image has no size');

  img.toBuffer()  // Here the nodejs server just is stopped with no errors

});

`

I have tried with img.toBufferAsync() and the same thing happens

Any leads to fix it will be great!

@stasovlas
Copy link

same issue

@bmathews
Copy link

bmathews commented Feb 8, 2017

If you're on windows, this problem will happen if your version of Visual Studio Build Tools doesn't match what opencv was compiled with.

For vs2015, use this version of opencv: https://github.com/opencv/opencv/releases/download/2.4.13.2/opencv-2.4.13.2-vc14.exe and make sure you're env variable is pointing to the v14 folder.

vc14: The compiler packaged with Visual Studio 2015
vc12: The compiler packaged with Visual Studio 2013
vc11: The compiler packaged with Visual Studio 2012
vc10: The compiler packaged with Visual Studio 2010

@PierrickLozach
Copy link

It would be nice if you could change the README to add the multiple versions of VS that are supported and which release needs to be downloaded

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

No branches or pull requests

4 participants