From e39d1011095de8e7428fe0e76b73986db3ca6918 Mon Sep 17 00:00:00 2001
From: Alexey <AlexeyAB@users.noreply.github.com>
Date: Thu, 17 May 2018 13:36:50 +0000
Subject: [PATCH] Merge pull request #844 from salbatron/patch-1

---
 src/image.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/image.c b/src/image.c
index ba5d60c..317b246 100644
--- a/src/image.c
+++ b/src/image.c
@@ -950,7 +950,7 @@
         sprintf(buff, "echo %s >> bad.list", filename);
         system(buff);
         return make_image(10,10,3);
-        //exit(0);
+        //exit(EXIT_FAILURE);
     }
     image out = ipl_to_image(src);
     cvReleaseImage(&src);
@@ -1691,7 +1691,11 @@
     unsigned char *data = stbi_load(filename, &w, &h, &c, channels);
     if (!data) {
         fprintf(stderr, "Cannot load image \"%s\"\nSTB Reason: %s\n", filename, stbi_failure_reason());
-        exit(1);
+		char buff[256];
+		sprintf(buff, "echo %s >> bad.list", filename);
+		system(buff);
+		return make_image(10, 10, 3);
+        //exit(EXIT_FAILURE);
     }
     if(channels) c = channels;
     int i,j,k;

--
Gitblit v1.10.0