Skip to content

Commit

Permalink
Copy resolution of source image (fix issue #1702)
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Weil <[email protected]>
  • Loading branch information
stweil committed Oct 20, 2019
1 parent 8be2346 commit a209a6b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ccmain/thresholder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a209a6b

Please sign in to comment.