Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

imshow does not "raise" an errno, and suprise, surprise, neither does fopen() on windows.

so, basically, your testing is flawed (in the fopen case, better check res != 0), and you're back to checking the path again.

the imdecode approach is awesome, but please cout << fileContents.size() , since that already might be empty.


cout << cv::getBuildInformation() << endl;

will additionally show you, what kind of image support was built in


also please check, if you linked the right libs there. debug versus release, x86 vs x64, vs2010 /vs2012 , as this kind of error is symptomatic for that case