From 31213c81c323ca81c73c3fbcd1b07fd5d46025c1 Mon Sep 17 00:00:00 2001 From: Joshua Zhang Date: Wed, 20 Sep 2017 21:28:07 -0700 Subject: [PATCH] modify log message --- src/io/image_io.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/io/image_io.cc b/src/io/image_io.cc index 103aab8ad164..df62753faebd 100644 --- a/src/io/image_io.cc +++ b/src/io/image_io.cc @@ -142,7 +142,7 @@ void ImdecodeImpl(int flag, bool to_rgb, void* data, size_t size, if (out->is_none()) { cv::Mat res = cv::imdecode(buf, flag); if (res.empty()) { - LOG(INFO) << "Invalid image file. Only supports png and jpg."; + LOG(INFO) << "Decoding failed. Invalid image file."; *out = NDArray(); return; } @@ -157,10 +157,10 @@ void ImdecodeImpl(int flag, bool to_rgb, void* data, size_t size, out->data().dptr_); #if (CV_MAJOR_VERSION > 2 || (CV_MAJOR_VERSION == 2 && CV_MINOR_VERSION >=4)) cv::imdecode(buf, flag, &dst); - CHECK(!dst.empty()) << "Failed decoding image to output directly."; + CHECK(!dst.empty()) << "Decoding failed. Invalid image file."; #else cv::Mat tmp = cv::imdecode(buf, flag); - CHECK(!tmp.empty()) << "Invalid image file. Only supports png and jpg."; + CHECK(!tmp.empty()) << "Decoding failed. Invalid image file."; tmp.copyTo(dst); CHECK(!dst.empty()) << "Failed copying buffer to output."; #endif