Skip to content

Commit a8f4441

Browse files
committed
Fix build with leptonica 1.73.
1 parent b4fcd0d commit a8f4441

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lstm/networkio.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ static void ComputeBlackWhite(Pix* pix, float* black, float* white) {
132132
STATS mins(0, 256), maxes(0, 256);
133133
if (width >= 3) {
134134
int y = height / 2;
135-
const l_uint32* line = pixGetData(pix) + pixGetWpl(pix) * y;
135+
l_uint32* line = pixGetData(pix) + pixGetWpl(pix) * y;
136136
int prev = GET_DATA_BYTE(line, 0);
137137
int curr = GET_DATA_BYTE(line, 1);
138138
for (int x = 1; x + 1 < width; ++x) {
@@ -218,7 +218,7 @@ void NetworkIO::Copy2DImage(int batch, Pix* pix, float black, float contrast,
218218
int num_features = NumFeatures();
219219
bool color = num_features == 3;
220220
if (width > target_width) width = target_width;
221-
const uinT32* line = pixGetData(pix);
221+
uinT32* line = pixGetData(pix);
222222
for (int y = 0; y < target_height; ++y, line += wpl) {
223223
int x = 0;
224224
if (y < height) {
@@ -257,7 +257,7 @@ void NetworkIO::Copy1DGreyImage(int batch, Pix* pix, float black,
257257
int x;
258258
for (x = 0; x < width; ++x, ++t) {
259259
for (int y = 0; y < height; ++y) {
260-
const uinT32* line = pixGetData(pix) + wpl * y;
260+
uinT32* line = pixGetData(pix) + wpl * y;
261261
int pixel = GET_DATA_BYTE(line, x);
262262
SetPixel(t, y, pixel, black, contrast);
263263
}

0 commit comments

Comments
 (0)