mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-28 05:39:35 +08:00
Copy resolution of source image (fix issue #1702)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
8be2346c4c
commit
a209a6b4b5
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user