From 319b2932125297a0cf63c736376f544ebad2825e Mon Sep 17 00:00:00 2001 From: Pavel Krajcevski Date: Sun, 20 Dec 2015 20:00:01 -0500 Subject: [PATCH] Report different image dimensions --- CLTool/src/compare.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CLTool/src/compare.cpp b/CLTool/src/compare.cpp index 9384153..555364c 100644 --- a/CLTool/src/compare.cpp +++ b/CLTool/src/compare.cpp @@ -117,6 +117,12 @@ int main(int argc, char **argv) { FasTC::Image<> &img1 = *img1f.GetImage(); FasTC::Image<> &img2 = *img2f.GetImage(); + if (img1.GetWidth() != img2.GetWidth() || + img1.GetHeight() != img2.GetHeight()) { + std::cerr << "Images differ in dimension!" << std::endl; + return 1; + } + if (diff_images) { FasTC::Image<> diff = img1.Diff(&img2, diff_multiplier);