Skip to content

Commit

Permalink
Fix build with leptonica 1.73.
Browse files Browse the repository at this point in the history
  • Loading branch information
egorpugin committed Nov 24, 2016
1 parent b4fcd0d commit a8f4441
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lstm/networkio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ static void ComputeBlackWhite(Pix* pix, float* black, float* white) {
STATS mins(0, 256), maxes(0, 256);
if (width >= 3) {
int y = height / 2;
const l_uint32* line = pixGetData(pix) + pixGetWpl(pix) * y;
l_uint32* line = pixGetData(pix) + pixGetWpl(pix) * y;
int prev = GET_DATA_BYTE(line, 0);
int curr = GET_DATA_BYTE(line, 1);
for (int x = 1; x + 1 < width; ++x) {
Expand Down Expand Up @@ -218,7 +218,7 @@ void NetworkIO::Copy2DImage(int batch, Pix* pix, float black, float contrast,
int num_features = NumFeatures();
bool color = num_features == 3;
if (width > target_width) width = target_width;
const uinT32* line = pixGetData(pix);
uinT32* line = pixGetData(pix);
for (int y = 0; y < target_height; ++y, line += wpl) {
int x = 0;
if (y < height) {
Expand Down Expand Up @@ -257,7 +257,7 @@ void NetworkIO::Copy1DGreyImage(int batch, Pix* pix, float black,
int x;
for (x = 0; x < width; ++x, ++t) {
for (int y = 0; y < height; ++y) {
const uinT32* line = pixGetData(pix) + wpl * y;
uinT32* line = pixGetData(pix) + wpl * y;
int pixel = GET_DATA_BYTE(line, x);
SetPixel(t, y, pixel, black, contrast);
}
Expand Down

0 comments on commit a8f4441

Please sign in to comment.