From a209a6b4b503c6ada4ce6eb257fde2b76c47f771 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sun, 20 Oct 2019 20:45:35 +0200 Subject: [PATCH] Copy resolution of source image (fix issue #1702) Signed-off-by: Stefan Weil --- src/ccmain/thresholder.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ccmain/thresholder.cpp b/src/ccmain/thresholder.cpp index cfdfca58..f446dc61 100644 --- a/src/ccmain/thresholder.cpp +++ b/src/ccmain/thresholder.cpp @@ -303,6 +303,8 @@ void ImageThresholder::ThresholdRectToPix(Pix* src_pix, int wpl = pixGetWpl(*pix); int src_wpl = pixGetWpl(src_pix); uint32_t* srcdata = pixGetData(src_pix); + pixSetXRes(*pix, pixGetXRes(src_pix)); + pixSetYRes(*pix, pixGetYRes(src_pix)); for (int y = 0; y < rect_height_; ++y) { const uint32_t* linedata = srcdata + (y + rect_top_) * src_wpl; uint32_t* pixline = pixdata + y * wpl;