AlexeyAB
2017-08-03 111b749d030b976758b2de337133d881fe47ffdc
fixed load image for OpenCV 3.0
1 files modified
10 ■■■■ changed files
src/image.c 10 ●●●● patch | view | raw | blame | history
src/image.c
@@ -1305,9 +1305,15 @@
image load_image(char *filename, int w, int h, int c)
{
#ifdef OPENCV
    image out = load_image_cv(filename, c);
#ifndef CV_VERSION_EPOCH
    image out = load_image_stb(filename, c);    // OpenCV 3.x
#else
    image out = load_image_stb(filename, c);
    image out = load_image_cv(filename, c);     // OpenCV 2.4.x
#endif
#else
    image out = load_image_stb(filename, c);    // without OpenCV
#endif
    if((h && w) && (h != out.h || w != out.w)){