Extracted from upstream commit 0264e7da2be67182deb031228eb07e6ed4943c81. diff --git a/src/lib_ccx/ocr.c b/src/lib_ccx/ocr.c index 31cc1c5c..73bd4818 100644 --- a/src/lib_ccx/ocr.c +++ b/src/lib_ccx/ocr.c @@ -331,6 +331,11 @@ char *ocr_bitmap(void *arg, png_color *palette, png_byte *alpha, unsigned char * } BOX *crop_points = ignore_alpha_at_edge(copy->alpha, copy->data, w, h, color_pix, &color_pix_out); + + l_int32 x, y, _w, _h; + + boxGetGeometry(crop_points, &x, &y, &_w, &_h); + // Converting image to grayscale for OCR to avoid issues with transparency cpix_gs = pixConvertRGBToGray(cpix, 0.0, 0.0, 0.0); @@ -426,8 +431,8 @@ char *ocr_bitmap(void *arg, png_color *palette, png_byte *alpha, unsigned char * { for (int j = x1; j <= x2; j++) { - if (copy->data[(crop_points->y + i) * w + (crop_points->x + j)] != firstpixel) - histogram[copy->data[(crop_points->y + i) * w + (crop_points->x + j)]]++; + if (copy->data[(y + i) * w + (x + j)] != firstpixel) + histogram[copy->data[(y + i) * w + (x + j)]]++; } } /* sorted in increasing order of intensity */ b94a9da3690ef274002eba92'>refslogtreecommitdiff
path: root/gnu/packages/chez.scm
AgeCommit message (Expand)Author
2021-09-13gnu: chez-web: Replace texlive-fonts-cm with texlive-cm....Ricardo Wurmus
2021-09-13gnu: chez-web: Add texlive-charter....Ricardo Wurmus
2021-09-13gnu: Add texlive-context....Ricardo Wurmus
2021-09-13gnu: Add texlive-pdftex....Ricardo Wurmus
2021-04-05gnu: chez-scheme: simplify packaging...Philip McGrath
2021-04-05gnu: chez-scheme: Update stex....Philip McGrath
2021-04-05gnu: chez-scheme: Update nanopass to 1.9.2....Philip McGrath
2020-12-18gnu: chez-scheme: Patch more hard-coded paths....Brendan Tildesley
2020-12-18gnu: chez-scheme: Update to 9.5.4....Brendan Tildesley
2020-09-02gnu: chez-scheme: Install libraries to 'lib/csvX.Y.Z-site'...Martin Becze
2020-08-28gnu: chez-srfi: Fix tests....Martin Becze