201 #include <config_auto.h>
206 #include "allheaders.h"
213 static const l_int32 DefaultInputRes = 300;
255 l_float32 scalefactor,
265 return ERROR_INT(
"dirname not defined", __func__, 1);
267 return ERROR_INT(
"fileout not defined", __func__, 1);
270 return ERROR_INT(
"sa not made", __func__, 1);
301 l_float32 scalefactor,
312 return ERROR_INT(
"sa not defined", __func__, 1);
315 title, &data, &nbytes);
317 if (data) LEPT_FREE(data);
318 return ERROR_INT(
"pdf data not made", __func__, 1);
324 L_ERROR(
"pdf data not written to file\n", __func__);
353 l_float32 scalefactor,
362 l_int32 i, n, ret, pagetype, npages, scaledres;
369 return ERROR_INT(
"&data not defined", __func__, 1);
372 return ERROR_INT(
"&nbytes not defined", __func__, 1);
375 return ERROR_INT(
"sa not defined", __func__, 1);
376 if (scalefactor <= 0.0) scalefactor = 1.0;
385 for (i = 0; i < n; i++) {
388 if ((pixs =
pixRead(fname)) == NULL) {
389 L_ERROR(
"image not readable from file %s\n", __func__, fname);
392 if (scalefactor != 1.0)
393 pix =
pixScale(pixs, scalefactor, scalefactor);
397 scaledres = (l_int32)(res * scalefactor);
404 L_ERROR(
"encoding type selection failed for file %s\n",
410 0, 0, scaledres, title, NULL, 0);
414 L_ERROR(
"pdf encoding failed for %s\n", __func__, fname);
423 L_ERROR(
"no pdf files made\n", __func__);
434 for (i = 0; i < npages; i++) {
467 l_int32 w, h, d, factor, ncolors;
471 return ERROR_INT(
"&type not defined", __func__, 1);
474 return ERROR_INT(
"pix not defined", __func__, 1);
476 cmap = pixGetColormap(pix);
477 if (d == 8 && !cmap) {
478 factor = L_MAX(1, (l_int32)sqrt((l_float64)(w * h) / 20000.));
486 }
else if (cmap || d == 2 || d == 4) {
488 }
else if (d == 8 || d == 32) {
490 }
else if (d == 16) {
493 return ERROR_INT(
"type selection failure", __func__, 1);
536 return ERROR_INT(
"dirname not defined", __func__, 1);
538 return ERROR_INT(
"fileout not defined", __func__, 1);
541 return ERROR_INT(
"sa not made", __func__, 1);
571 return ERROR_INT(
"sa not defined", __func__, 1);
575 if (data) LEPT_FREE(data);
576 return ERROR_INT(
"pdf data not made", __func__, 1);
582 L_ERROR(
"pdf data not written to file\n", __func__);
611 l_int32 i, n, ret, npages;
617 return ERROR_INT(
"&data not defined", __func__, 1);
620 return ERROR_INT(
"&nbytes not defined", __func__, 1);
623 return ERROR_INT(
"sa not defined", __func__, 1);
628 for (i = 0; i < n; i++) {
638 if (imdata) LEPT_FREE(imdata);
643 L_ERROR(
"no pdf files made\n", __func__);
655 for (i = 0; i < npages; i++) {
690 return ERROR_INT(
"&data not defined", __func__, 1);
693 return ERROR_INT(
"&nbytes not defined", __func__, 1);
696 return ERROR_INT(
"fname not defined", __func__, 1);
699 if (format == IFF_UNKNOWN) {
700 L_WARNING(
"file %s format is unknown; skip\n", __func__, fname);
703 if (format == IFF_PS || format == IFF_LPDF) {
704 L_WARNING(
"file %s format is %d; skip\n", __func__, fname, format);
713 L_ERROR(
"file %s format is %d; unreadable\n", __func__, fname, format);
758 l_float32 scalefactor,
769 return ERROR_INT(
"pixa not defined", __func__, 1);
772 title, &data, &nbytes);
775 return ERROR_INT(
"conversion to pdf failed", __func__, 1);
781 L_ERROR(
"pdf data not written to file\n", __func__);
810 l_float32 scalefactor,
818 l_int32 i, n, ret, scaledres, pagetype;
825 return ERROR_INT(
"&data not defined", __func__, 1);
828 return ERROR_INT(
"&nbytes not defined", __func__, 1);
831 return ERROR_INT(
"pixa not defined", __func__, 1);
832 if (scalefactor <= 0.0) scalefactor = 1.0;
833 if (scalefactor >= 50.0)
834 return ERROR_INT(
"scalefactor too large", __func__, 1);
838 L_WARNING(
"invalid compression type; using per-page default\n",
842 if (quality < 0 || quality > 100)
843 return ERROR_INT(
"invalid quality", __func__, 1);
848 for (i = 0; i < n; i++) {
850 L_ERROR(
"pixs[%d] not retrieved\n", __func__, i);
853 if (scalefactor != 1.0)
854 pix =
pixScale(pixs, scalefactor, scalefactor);
859 L_ERROR(
"pix[%d] not made\n", __func__, i);
862 scaledres = (l_int32)(res * scalefactor);
868 L_ERROR(
"encoding type selection failed for pix[%d]\n",
875 0, 0, scaledres, title, NULL, 0);
879 L_ERROR(
"pdf encoding failed for pix[%d]\n", __func__, i);
888 L_ERROR(
"no pdf files made\n", __func__);
897 for (i = 0; i < n; i++) {
985 return ERROR_INT(
"filein not defined", __func__, 1);
988 return ERROR_INT(
"fileout not defined", __func__, 1);
992 res, title, plpd, position))
993 return ERROR_INT(
"pdf data not made", __func__, 1);
999 return ERROR_INT(
"pdf data not written to file", __func__, 1);
1043 const char *fileout,
1055 return ERROR_INT(
"image data not defined", __func__, 1);
1058 return ERROR_INT(
"fileout not defined", __func__, 1);
1061 if ((pix =
pixReadMem(imdata, size)) == NULL)
1062 return ERROR_INT(
"pix not read", __func__, 1);
1068 title, plpd, position);
1121 return ERROR_INT(
"&data not defined", __func__, 1);
1124 return ERROR_INT(
"&nbytes not defined", __func__, 1);
1127 return ERROR_INT(
"filein not defined", __func__, 1);
1129 if ((pix =
pixRead(filein)) == NULL)
1130 return ERROR_INT(
"pix not made", __func__, 1);
1133 x, y, res, title, plpd, position);
1189 return ERROR_INT(
"&data not defined", __func__, 1);
1192 return ERROR_INT(
"&nbytes not defined", __func__, 1);
1195 return ERROR_INT(
"image data not defined", __func__, 1);
1201 if ((pix =
pixReadMem(imdata, size)) == NULL)
1202 return ERROR_INT(
"pix not read", __func__, 1);
1208 x, y, res, title, plpd, position);
1251 const char *fileout,
1264 return ERROR_INT(
"pix not defined", __func__, 1);
1267 return ERROR_INT(
"fileout not defined", __func__, 1);
1271 x, y, res, title, plpd, position)) {
1273 return ERROR_INT(
"pdf data not made", __func__, 1);
1280 return ERROR_INT(
"pdf data not written to file", __func__, 1);
1311 size_t nbytes, nbytes_written;
1314 return ERROR_INT(
"stream not opened", __func__, 1);
1316 return ERROR_INT(
"pix not defined", __func__, 1);
1320 return ERROR_INT(
"pdf data not made", __func__, 1);
1323 nbytes_written = fwrite(data, 1, nbytes, fp);
1325 if (nbytes != nbytes_written)
1326 return ERROR_INT(
"failure writing pdf data to stream", __func__, 1);
1359 if (pdata) *pdata = NULL;
1360 if (pnbytes) *pnbytes = 0;
1361 if (!pdata || !pnbytes)
1362 return ERROR_INT(
"&data or &nbytes not defined", __func__, 1);
1364 return ERROR_INT(
"pix not defined", __func__, 1);
1368 0, 0, res, title, NULL, 0);
1370 return ERROR_INT(
"pdf data not made", __func__, 1);
1429 l_float32 scalefactor,
1431 const char *fileout)
1434 l_uint8 *imdata, *data;
1435 l_int32 i, npages, nboxa, nboxes, ret;
1436 size_t imbytes, databytes;
1443 return ERROR_INT(
"dirname not defined", __func__, 1);
1445 return ERROR_INT(
"fileout not defined", __func__, 1);
1449 return ERROR_INT(
"sa not made", __func__, 1);
1456 if (nboxa < npages) {
1465 for (i = 0; i < npages; i++) {
1467 if (!strcmp(fname,
""))
continue;
1476 quality, scalefactor, title,
1480 L_ERROR(
"pdf encoding failed for %s\n", __func__, fname);
1484 if (imdata) LEPT_FREE(imdata);
1491 L_ERROR(
"no pdf files made\n", __func__);
1501 for (i = 0; i < npages; i++) {
1508 if (data) LEPT_FREE(data);
1509 return ERROR_INT(
"pdf data not made", __func__, 1);
1515 L_ERROR(
"pdf data not written to file\n", __func__);
1553 return (
BOXAA *)ERROR_PTR(
"dirname not defined", __func__, NULL);
1556 numpost, 10000)) == NULL)
1557 return (
BOXAA *)ERROR_PTR(
"sa not made", __func__, NULL);
1565 for (i = 0; i < n; i++) {
1567 if (!strcmp(fname,
""))
continue;
1568 if ((pix =
pixRead(fname)) == NULL) {
1569 L_WARNING(
"invalid image on page %d\n", __func__, i);
1653 l_float32 scalefactor,
1655 const char *fileout)
1661 return ERROR_INT(
"filein not defined", __func__, 1);
1663 return ERROR_INT(
"fileout not defined", __func__, 1);
1666 return ERROR_INT(
"invalid conversion type", __func__, 1);
1667 if (boxa && scalefactor > 1.0) {
1668 L_WARNING(
"setting scalefactor to 1.0\n", __func__);
1672 if ((pixs =
pixRead(filein)) == NULL)
1673 return ERROR_INT(
"pixs not made", __func__, 1);
1676 scalefactor, title, fileout);
1710 l_float32 scalefactor,
1712 const char *fileout)
1719 return ERROR_INT(
"pixs not defined", __func__, 1);
1721 return ERROR_INT(
"fileout not defined", __func__, 1);
1724 return ERROR_INT(
"invalid conversion type", __func__, 1);
1725 if (boxa && scalefactor > 1.0) {
1726 L_WARNING(
"setting scalefactor to 1.0\n", __func__);
1731 scalefactor, title, &data, &nbytes);
1733 return ERROR_INT(
"pdf generation failure", __func__, 1);
1736 if (data) LEPT_FREE(data);
1772 l_float32 scalefactor,
1781 return ERROR_INT(
"&data not defined", __func__, 1);
1784 return ERROR_INT(
"&nbytes not defined", __func__, 1);
1787 return ERROR_INT(
"filein not defined", __func__, 1);
1790 return ERROR_INT(
"invalid conversion type", __func__, 1);
1791 if (boxa && scalefactor > 1.0) {
1792 L_WARNING(
"setting scalefactor to 1.0\n", __func__);
1796 if ((pixs =
pixRead(filein)) == NULL)
1797 return ERROR_INT(
"pixs not made", __func__, 1);
1800 quality, scalefactor, title,
1836 l_float32 scalefactor,
1841 l_int32 i, nbox, seq, bx, by, bw, bh, upscale;
1843 BOX *box, *boxc, *box2;
1844 PIX *pix, *pixt1, *pixt2, *pixt3, *pixt4, *pixt5, *pixt6;
1849 return ERROR_INT(
"&data not defined", __func__, 1);
1852 return ERROR_INT(
"&nbytes not defined", __func__, 1);
1855 return ERROR_INT(
"pixs not defined", __func__, 1);
1858 return ERROR_INT(
"invalid conversion type", __func__, 1);
1859 if (boxa && (scalefactor <= 0.0 || scalefactor > 1.0)) {
1860 L_WARNING(
"setting scalefactor to 1.0\n", __func__);
1866 res = DefaultInputRes;
1867 scale = (l_float32)((l_int32)(scalefactor * res + 0.5)) / (l_float32)res;
1868 cmap = pixGetColormap(pixs);
1872 if (pixGetDepth(pixs) > 1 && type ==
L_G4_ENCODE) {
1879 0, 0, 2 * res, title, NULL, 0);
1884 0, 0, res, title, NULL, 0);
1900 for (i = 0; i < nbox; i++) {
1910 if (pixGetDepth(pixt3) == 1)
1913 pixt4 =
pixScale(pixt3, scale, scale);
1915 0, 0, (l_int32)(scale * res), title,
1918 if (pixGetDepth(pixt1) == 1) {
1941 for (i = 0; i < nbox; i++) {
1945 if (pixGetDepth(pixt3) == 1)
1948 pixt4 =
pixScale(pixt3, scale, scale);
1953 bx, by, (l_int32)(scale * res), title,
1995 const char *fileout)
2001 return ERROR_INT(
"dirname not defined", __func__, 1);
2003 return ERROR_INT(
"fileout not defined", __func__, 1);
2006 return ERROR_INT(
"sa not made", __func__, 1);
2027 const char *fileout)
2034 return ERROR_INT(
"sa not defined", __func__, 1);
2036 return ERROR_INT(
"fileout not defined", __func__, 1);
2040 return ERROR_INT(
"pdf data not made", __func__, 1);
2061 const char *fileout)
2068 return ERROR_INT(
"pa not defined", __func__, 1);
2070 return ERROR_INT(
"fileout not defined", __func__, 1);
2074 return ERROR_INT(
"pdf data not made", __func__, 1);
2112 return ERROR_INT(
"&data not defined", __func__, 1);
2115 return ERROR_INT(
"&nbytes not defined", __func__, 1);
2118 return ERROR_INT(
"dirname not defined", __func__, 1);
2121 return ERROR_INT(
"sa not made", __func__, 1);
2147 l_int32 i, npages, ret;
2152 return ERROR_INT(
"&data not defined", __func__, 1);
2155 return ERROR_INT(
"&nbytes not defined", __func__, 1);
2158 return ERROR_INT(
"sa not defined", __func__, 1);
2162 return ERROR_INT(
"no filenames found", __func__, 1);
2164 for (i = 0; i < npages; i++) {
2174 for (i = 0; i < npages; i++) {
l_ok boxaaInitFull(BOXAA *baa, BOXA *boxa)
boxaaInitFull()
l_ok boxGetGeometry(const BOX *box, l_int32 *px, l_int32 *py, l_int32 *pw, l_int32 *ph)
boxGetGeometry()
l_ok boxaaReplaceBoxa(BOXAA *baa, l_int32 index, BOXA *boxa)
boxaaReplaceBoxa()
void boxDestroy(BOX **pbox)
boxDestroy()
BOXAA * boxaaCreate(l_int32 n)
boxaaCreate()
l_int32 boxaaGetCount(BOXAA *baa)
boxaaGetCount()
l_ok boxaaExtendWithInit(BOXAA *baa, l_int32 maxindex, BOXA *boxa)
boxaaExtendWithInit()
void boxaDestroy(BOXA **pboxa)
boxaDestroy()
l_int32 boxaGetCount(const BOXA *boxa)
boxaGetCount()
BOXA * boxaaGetBoxa(BOXAA *baa, l_int32 index, l_int32 accessflag)
boxaaGetBoxa()
BOX * boxaGetBox(BOXA *boxa, l_int32 index, l_int32 accessflag)
boxaGetBox()
BOXA * boxaCreate(l_int32 n)
boxaCreate()
BOX * boxTransform(BOX *box, l_int32 shiftx, l_int32 shifty, l_float32 scalex, l_float32 scaley)
boxTransform()
PIX * pixSetBlackOrWhiteBoxa(PIX *pixs, BOXA *boxa, l_int32 op)
pixSetBlackOrWhiteBoxa()
void l_byteaDestroy(L_BYTEA **pba)
l_byteaDestroy()
L_BYTEA * l_byteaInitFromMem(const l_uint8 *data, size_t size)
l_byteaInitFromMem()
L_BYTEA * l_byteaInitFromFile(const char *fname)
l_byteaInitFromFile()
l_ok pixNumColors(PIX *pixs, l_int32 factor, l_int32 *pncolors)
pixNumColors()
BOXA * pixConnComp(PIX *pixs, PIXA **ppixa, l_int32 connectivity)
pixConnComp()
l_ok concatenatePdf(const char *dirname, const char *substr, const char *fileout)
concatenatePdf()
l_ok concatenatePdfToData(const char *dirname, const char *substr, l_uint8 **pdata, size_t *pnbytes)
concatenatePdfToData()
l_ok saConvertFilesToPdf(SARRAY *sa, l_int32 res, l_float32 scalefactor, l_int32 type, l_int32 quality, const char *title, const char *fileout)
saConvertFilesToPdf()
l_ok convertUnscaledFilesToPdf(const char *dirname, const char *substr, const char *title, const char *fileout)
convertUnscaledFilesToPdf()
l_ok pixWriteMemPdf(l_uint8 **pdata, size_t *pnbytes, PIX *pix, l_int32 res, const char *title)
pixWriteMemPdf()
l_ok convertToPdf(const char *filein, l_int32 type, l_int32 quality, const char *fileout, l_int32 x, l_int32 y, l_int32 res, const char *title, L_PDF_DATA **plpd, l_int32 position)
convertToPdf()
l_ok saConvertFilesToPdfData(SARRAY *sa, l_int32 res, l_float32 scalefactor, l_int32 type, l_int32 quality, const char *title, l_uint8 **pdata, size_t *pnbytes)
saConvertFilesToPdfData()
l_ok convertToPdfData(const char *filein, l_int32 type, l_int32 quality, l_uint8 **pdata, size_t *pnbytes, l_int32 x, l_int32 y, l_int32 res, const char *title, L_PDF_DATA **plpd, l_int32 position)
convertToPdfData()
l_ok ptraConcatenatePdf(L_PTRA *pa, const char *fileout)
ptraConcatenatePdf()
l_ok convertSegmentedFilesToPdf(const char *dirname, const char *substr, l_int32 res, l_int32 type, l_int32 thresh, BOXAA *baa, l_int32 quality, l_float32 scalefactor, const char *title, const char *fileout)
convertSegmentedFilesToPdf()
l_ok pixaConvertToPdfData(PIXA *pixa, l_int32 res, l_float32 scalefactor, l_int32 type, l_int32 quality, const char *title, l_uint8 **pdata, size_t *pnbytes)
pixaConvertToPdfData()
l_ok saConcatenatePdfToData(SARRAY *sa, l_uint8 **pdata, size_t *pnbytes)
saConcatenatePdfToData()
l_ok pixConvertToPdf(PIX *pix, l_int32 type, l_int32 quality, const char *fileout, l_int32 x, l_int32 y, l_int32 res, const char *title, L_PDF_DATA **plpd, l_int32 position)
pixConvertToPdf()
l_ok convertToPdfSegmented(const char *filein, l_int32 res, l_int32 type, l_int32 thresh, BOXA *boxa, l_int32 quality, l_float32 scalefactor, const char *title, const char *fileout)
convertToPdfSegmented()
l_ok pixaConvertToPdf(PIXA *pixa, l_int32 res, l_float32 scalefactor, l_int32 type, l_int32 quality, const char *title, const char *fileout)
pixaConvertToPdf()
l_ok convertImageDataToPdf(l_uint8 *imdata, size_t size, l_int32 type, l_int32 quality, const char *fileout, l_int32 x, l_int32 y, l_int32 res, const char *title, L_PDF_DATA **plpd, l_int32 position)
convertImageDataToPdf()
l_ok pixWriteStreamPdf(FILE *fp, PIX *pix, l_int32 res, const char *title)
pixWriteStreamPdf()
l_ok convertImageDataToPdfData(l_uint8 *imdata, size_t size, l_int32 type, l_int32 quality, l_uint8 **pdata, size_t *pnbytes, l_int32 x, l_int32 y, l_int32 res, const char *title, L_PDF_DATA **plpd, l_int32 position)
convertImageDataToPdfData()
l_ok saConvertUnscaledFilesToPdf(SARRAY *sa, const char *title, const char *fileout)
saConvertUnscaledFilesToPdf()
l_ok convertToPdfDataSegmented(const char *filein, l_int32 res, l_int32 type, l_int32 thresh, BOXA *boxa, l_int32 quality, l_float32 scalefactor, const char *title, l_uint8 **pdata, size_t *pnbytes)
convertToPdfDataSegmented()
l_ok convertUnscaledToPdfData(const char *fname, const char *title, l_uint8 **pdata, size_t *pnbytes)
convertUnscaledToPdfData()
l_ok saConcatenatePdf(SARRAY *sa, const char *fileout)
saConcatenatePdf()
l_ok pixConvertToPdfSegmented(PIX *pixs, l_int32 res, l_int32 type, l_int32 thresh, BOXA *boxa, l_int32 quality, l_float32 scalefactor, const char *title, const char *fileout)
pixConvertToPdfSegmented()
BOXAA * convertNumberedMasksToBoxaa(const char *dirname, const char *substr, l_int32 numpre, l_int32 numpost)
convertNumberedMasksToBoxaa()
l_ok selectDefaultPdfEncoding(PIX *pix, l_int32 *ptype)
selectDefaultPdfEncoding()
l_ok convertFilesToPdf(const char *dirname, const char *substr, l_int32 res, l_float32 scalefactor, l_int32 type, l_int32 quality, const char *title, const char *fileout)
convertFilesToPdf()
l_ok saConvertUnscaledFilesToPdfData(SARRAY *sa, const char *title, l_uint8 **pdata, size_t *pnbytes)
saConvertUnscaledFilesToPdfData()
l_ok pixConvertToPdfDataSegmented(PIX *pixs, l_int32 res, l_int32 type, l_int32 thresh, BOXA *boxa, l_int32 quality, l_float32 scalefactor, const char *title, l_uint8 **pdata, size_t *pnbytes)
pixConvertToPdfDataSegmented()
l_ok pixConvertToPdfData(PIX *pix, l_int32 type, l_int32 quality, l_uint8 **pdata, size_t *pnbytes, l_int32 x, l_int32 y, l_int32 res, const char *title, L_PDF_DATA **plpd, l_int32 position)
pixConvertToPdfData()
l_ok ptraConcatenatePdfToData(L_PTRA *pa_data, SARRAY *sa, l_uint8 **pdata, size_t *pnbytes)
ptraConcatenatePdfToData()
l_ok cidConvertToPdfData(L_COMP_DATA *cid, const char *title, l_uint8 **pdata, size_t *pnbytes)
cidConvertToPdfData()
l_ok l_generateCIDataForPdf(const char *fname, PIX *pix, l_int32 quality, L_COMP_DATA **pcid)
l_generateCIDataForPdf()
void pixDestroy(PIX **ppix)
pixDestroy()
l_ok pixGetDimensions(const PIX *pix, l_int32 *pw, l_int32 *ph, l_int32 *pd)
pixGetDimensions()
PIX * pixCreateTemplate(const PIX *pixs)
pixCreateTemplate()
PIX * pixClone(PIX *pixs)
pixClone()
l_ok pixSetBlackOrWhite(PIX *pixs, l_int32 op)
pixSetBlackOrWhite()
PIX * pixClipRectangle(PIX *pixs, BOX *box, BOX **pboxc)
pixClipRectangle()
@ REMOVE_CMAP_TO_GRAYSCALE
@ REMOVE_CMAP_BASED_ON_SRC
l_int32 pixaGetCount(PIXA *pixa)
pixaGetCount()
PIX * pixaGetPix(PIXA *pixa, l_int32 index, l_int32 accesstype)
pixaGetPix()
PIX * pixRemoveColormap(PIX *pixs, l_int32 type)
pixRemoveColormap()
PIX * pixConvertTo8(PIX *pixs, l_int32 cmapflag)
pixConvertTo8()
L_PTRA * ptraCreate(l_int32 n)
ptraCreate()
l_ok ptraGetActualCount(L_PTRA *pa, l_int32 *pcount)
ptraGetActualCount()
l_ok ptraAdd(L_PTRA *pa, void *item)
ptraAdd()
void ptraDestroy(L_PTRA **ppa, l_int32 freeflag, l_int32 warnflag)
ptraDestroy()
void * ptraRemove(L_PTRA *pa, l_int32 index, l_int32 flag)
ptraRemove()
l_ok findFileFormat(const char *filename, l_int32 *pformat)
findFileFormat()
PIX * pixReadMem(const l_uint8 *data, size_t size)
pixReadMem()
PIX * pixRead(const char *filename)
pixRead()
l_ok pixRasterop(PIX *pixd, l_int32 dx, l_int32 dy, l_int32 dw, l_int32 dh, l_int32 op, PIX *pixs, l_int32 sx, l_int32 sy)
pixRasterop()
char * sarrayGetString(SARRAY *sa, l_int32 index, l_int32 copyflag)
sarrayGetString()
l_int32 sarrayGetCount(SARRAY *sa)
sarrayGetCount()
void sarrayDestroy(SARRAY **psa)
sarrayDestroy()
SARRAY * getSortedPathnamesInDirectory(const char *dirname, const char *substr, l_int32 first, l_int32 nfiles)
getSortedPathnamesInDirectory()
SARRAY * getNumberedPathnamesInDirectory(const char *dirname, const char *substr, l_int32 numpre, l_int32 numpost, l_int32 maxnum)
getNumberedPathnamesInDirectory()
PIX * pixScale(PIX *pixs, l_float32 scalex, l_float32 scaley)
pixScale()
PIX * pixScaleGray2xLIThresh(PIX *pixs, l_int32 thresh)
pixScaleGray2xLIThresh()
PIX * pixScaleToGray(PIX *pixs, l_float32 scalefactor)
pixScaleToGray()
void lept_stderr(const char *fmt,...)
lept_stderr()
l_ok l_binaryWrite(const char *filename, const char *operation, const void *data, size_t nbytes)
l_binaryWrite()