Copy resolution of source image (fix issue #1702)

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2019-10-20 20:45:35 +02:00
parent 8be2346c4c
commit a209a6b4b5

View File

@ -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;