201 #include <config_auto.h> 206 #include "allheaders.h" 213 static const l_int32 DefaultInputRes = 300;
256 l_float32 scalefactor,
265 PROCNAME(
"convertFilesToPdf");
268 return ERROR_INT(
"dirname not defined", procName, 1);
270 return ERROR_INT(
"fileout not defined", procName, 1);
273 return ERROR_INT(
"sa not made", procName, 1);
305 l_float32 scalefactor,
315 PROCNAME(
"saConvertFilesToPdf");
318 return ERROR_INT(
"sa not defined", procName, 1);
321 title, &data, &nbytes);
323 if (data) LEPT_FREE(data);
324 return ERROR_INT(
"pdf data not made", procName, 1);
330 L_ERROR(
"pdf data not written to file\n", procName);
360 l_float32 scalefactor,
368 const char *pdftitle;
370 l_int32 i, n, ret, pagetype, npages, scaledres;
376 PROCNAME(
"saConvertFilesToPdfData");
379 return ERROR_INT(
"&data not defined", procName, 1);
382 return ERROR_INT(
"&nbytes not defined", procName, 1);
385 return ERROR_INT(
"sa not defined", procName, 1);
386 if (scalefactor <= 0.0) scalefactor = 1.0;
396 for (i = 0; i < n; i++) {
399 if ((pixs =
pixRead(fname)) == NULL) {
400 L_ERROR(
"image not readable from file %s\n", procName, fname);
404 pdftitle = (title) ? title : fname;
405 if (scalefactor != 1.0)
406 pix =
pixScale(pixs, scalefactor, scalefactor);
410 scaledres = (l_int32)(res * scalefactor);
417 L_ERROR(
"encoding type selection failed for file %s\n",
423 0, 0, scaledres, pdftitle, NULL, 0);
427 L_ERROR(
"pdf encoding failed for %s\n", procName, fname);
436 L_ERROR(
"no pdf files made\n", procName);
447 for (i = 0; i < npages; i++) {
480 l_int32 w, h, d, factor, ncolors;
483 PROCNAME(
"selectDefaultPdfEncoding");
486 return ERROR_INT(
"&type not defined", procName, 1);
489 return ERROR_INT(
"pix not defined", procName, 1);
491 cmap = pixGetColormap(pix);
492 if (d == 8 && !cmap) {
493 factor = L_MAX(1, (l_int32)sqrt((l_float64)(w * h) / 20000.));
501 }
else if (cmap || d == 2 || d == 4) {
503 }
else if (d == 8 || d == 32) {
506 return ERROR_INT(
"type selection failure", procName, 1);
548 PROCNAME(
"convertUnscaledFilesToPdf");
551 return ERROR_INT(
"dirname not defined", procName, 1);
553 return ERROR_INT(
"fileout not defined", procName, 1);
556 return ERROR_INT(
"sa not made", procName, 1);
586 PROCNAME(
"saConvertUnscaledFilesToPdf");
589 return ERROR_INT(
"sa not defined", procName, 1);
593 if (data) LEPT_FREE(data);
594 return ERROR_INT(
"pdf data not made", procName, 1);
600 L_ERROR(
"pdf data not written to file\n", procName);
630 l_int32 i, n, ret, npages;
635 PROCNAME(
"saConvertUnscaledFilesToPdfData");
638 return ERROR_INT(
"&data not defined", procName, 1);
641 return ERROR_INT(
"&nbytes not defined", procName, 1);
644 return ERROR_INT(
"sa not defined", procName, 1);
649 for (i = 0; i < n; i++) {
659 if (imdata) LEPT_FREE(imdata);
664 L_ERROR(
"no pdf files made\n", procName);
676 for (i = 0; i < npages; i++) {
707 const char *pdftitle = NULL;
712 PROCNAME(
"convertUnscaledToPdfData");
715 return ERROR_INT(
"&data not defined", procName, 1);
718 return ERROR_INT(
"&nbytes not defined", procName, 1);
721 return ERROR_INT(
"fname not defined", procName, 1);
724 if (format == IFF_UNKNOWN) {
725 L_WARNING(
"file %s format is unknown; skip\n", procName, fname);
728 if (format == IFF_PS || format == IFF_LPDF) {
729 L_WARNING(
"file %s format is %d; skip\n", procName, fname, format);
738 L_ERROR(
"file %s format is %d; unreadable\n", procName, fname, format);
792 l_float32 scalefactor,
802 PROCNAME(
"pixaConvertToPdf");
805 return ERROR_INT(
"pixa not defined", procName, 1);
808 title, &data, &nbytes);
811 return ERROR_INT(
"conversion to pdf failed", procName, 1);
817 L_ERROR(
"pdf data not written to file\n", procName);
846 l_float32 scalefactor,
854 l_int32 i, n, ret, scaledres, pagetype;
860 PROCNAME(
"pixaConvertToPdfData");
863 return ERROR_INT(
"&data not defined", procName, 1);
866 return ERROR_INT(
"&nbytes not defined", procName, 1);
869 return ERROR_INT(
"pixa not defined", procName, 1);
870 if (scalefactor <= 0.0) scalefactor = 1.0;
874 L_WARNING(
"invalid compression type; using per-page default\n",
882 for (i = 0; i < n; i++) {
884 L_ERROR(
"pix[%d] not retrieved\n", procName, i);
887 if (scalefactor != 1.0)
888 pix =
pixScale(pixs, scalefactor, scalefactor);
892 scaledres = (l_int32)(res * scalefactor);
898 L_ERROR(
"encoding type selection failed for pix[%d]\n",
905 0, 0, scaledres, title, NULL, 0);
909 L_ERROR(
"pdf encoding failed for pix[%d]\n", procName, i);
918 L_ERROR(
"no pdf files made\n", procName);
927 for (i = 0; i < n; i++) {
1002 const char *fileout,
1014 PROCNAME(
"convertToPdf");
1017 return ERROR_INT(
"filein not defined", procName, 1);
1020 return ERROR_INT(
"fileout not defined", procName, 1);
1024 res, title, plpd, position))
1025 return ERROR_INT(
"pdf data not made", procName, 1);
1031 return ERROR_INT(
"pdf data not written to file", procName, 1);
1075 const char *fileout,
1086 PROCNAME(
"convertImageDataToPdf");
1089 return ERROR_INT(
"image data not defined", procName, 1);
1092 return ERROR_INT(
"fileout not defined", procName, 1);
1095 if ((pix =
pixReadMem(imdata, size)) == NULL)
1096 return ERROR_INT(
"pix not read", procName, 1);
1102 title, plpd, position);
1154 PROCNAME(
"convertToPdfData");
1157 return ERROR_INT(
"&data not defined", procName, 1);
1160 return ERROR_INT(
"&nbytes not defined", procName, 1);
1163 return ERROR_INT(
"filein not defined", procName, 1);
1165 if ((pix =
pixRead(filein)) == NULL)
1166 return ERROR_INT(
"pix not made", procName, 1);
1169 x, y, res, (title) ? title : filein, plpd, position);
1224 PROCNAME(
"convertImageDataToPdfData");
1227 return ERROR_INT(
"&data not defined", procName, 1);
1230 return ERROR_INT(
"&nbytes not defined", procName, 1);
1233 return ERROR_INT(
"image data not defined", procName, 1);
1239 if ((pix =
pixReadMem(imdata, size)) == NULL)
1240 return ERROR_INT(
"pix not read", procName, 1);
1246 x, y, res, title, plpd, position);
1289 const char *fileout,
1301 PROCNAME(
"pixConvertToPdf");
1304 return ERROR_INT(
"pix not defined", procName, 1);
1307 return ERROR_INT(
"fileout not defined", procName, 1);
1311 x, y, res, title, plpd, position)) {
1313 return ERROR_INT(
"pdf data not made", procName, 1);
1320 return ERROR_INT(
"pdf data not written to file", procName, 1);
1352 size_t nbytes, nbytes_written;
1354 PROCNAME(
"pixWriteStreamPdf");
1357 return ERROR_INT(
"stream not opened", procName, 1);
1359 return ERROR_INT(
"pix not defined", procName, 1);
1363 return ERROR_INT(
"pdf data not made", procName, 1);
1366 nbytes_written = fwrite(data, 1, nbytes, fp);
1368 if (nbytes != nbytes_written)
1369 return ERROR_INT(
"failure writing pdf data to stream", procName, 1);
1403 PROCNAME(
"pixWriteMemPdf");
1405 if (pdata) *pdata = NULL;
1406 if (pnbytes) *pnbytes = 0;
1407 if (!pdata || !pnbytes)
1408 return ERROR_INT(
"&data or &nbytes not defined", procName, 1);
1410 return ERROR_INT(
"pix not defined", procName, 1);
1414 0, 0, res, title, NULL, 0);
1416 return ERROR_INT(
"pdf data not made", procName, 1);
1476 l_float32 scalefactor,
1478 const char *fileout)
1481 l_uint8 *imdata, *data;
1482 l_int32 i, npages, nboxa, nboxes, ret;
1483 size_t imbytes, databytes;
1489 PROCNAME(
"convertSegmentedFilesToPdf");
1492 return ERROR_INT(
"dirname not defined", procName, 1);
1494 return ERROR_INT(
"fileout not defined", procName, 1);
1498 return ERROR_INT(
"sa not made", procName, 1);
1505 if (nboxa < npages) {
1514 for (i = 0; i < npages; i++) {
1516 if (!strcmp(fname,
""))
continue;
1525 quality, scalefactor, title,
1529 L_ERROR(
"pdf encoding failed for %s\n", procName, fname);
1533 if (imdata) LEPT_FREE(imdata);
1540 L_ERROR(
"no pdf files made\n", procName);
1550 for (i = 0; i < npages; i++) {
1557 if (data) LEPT_FREE(data);
1558 return ERROR_INT(
"pdf data not made", procName, 1);
1564 L_ERROR(
"pdf data not written to file\n", procName);
1600 PROCNAME(
"convertNumberedMasksToBoxaa");
1603 return (
BOXAA *)ERROR_PTR(
"dirname not defined", procName, NULL);
1606 numpost, 10000)) == NULL)
1607 return (
BOXAA *)ERROR_PTR(
"sa not made", procName, NULL);
1615 for (i = 0; i < n; i++) {
1617 if (!strcmp(fname,
""))
continue;
1618 if ((pix =
pixRead(fname)) == NULL) {
1619 L_WARNING(
"invalid image on page %d\n", procName, i);
1704 l_float32 scalefactor,
1706 const char *fileout)
1711 PROCNAME(
"convertToPdfSegmented");
1714 return ERROR_INT(
"filein not defined", procName, 1);
1716 return ERROR_INT(
"fileout not defined", procName, 1);
1719 return ERROR_INT(
"invalid conversion type", procName, 1);
1720 if (boxa && scalefactor > 1.0) {
1721 L_WARNING(
"setting scalefactor to 1.0\n", procName);
1725 if ((pixs =
pixRead(filein)) == NULL)
1726 return ERROR_INT(
"pixs not made", procName, 1);
1729 scalefactor, (title) ? title : filein,
1765 l_float32 scalefactor,
1767 const char *fileout)
1773 PROCNAME(
"pixConvertToPdfSegmented");
1776 return ERROR_INT(
"pixs not defined", procName, 1);
1778 return ERROR_INT(
"fileout not defined", procName, 1);
1781 return ERROR_INT(
"invalid conversion type", procName, 1);
1782 if (boxa && scalefactor > 1.0) {
1783 L_WARNING(
"setting scalefactor to 1.0\n", procName);
1788 scalefactor, title, &data, &nbytes);
1790 return ERROR_INT(
"pdf generation failure", procName, 1);
1793 if (data) LEPT_FREE(data);
1829 l_float32 scalefactor,
1837 PROCNAME(
"convertToPdfDataSegmented");
1840 return ERROR_INT(
"&data not defined", procName, 1);
1843 return ERROR_INT(
"&nbytes not defined", procName, 1);
1846 return ERROR_INT(
"filein not defined", procName, 1);
1849 return ERROR_INT(
"invalid conversion type", procName, 1);
1850 if (boxa && scalefactor > 1.0) {
1851 L_WARNING(
"setting scalefactor to 1.0\n", procName);
1855 if ((pixs =
pixRead(filein)) == NULL)
1856 return ERROR_INT(
"pixs not made", procName, 1);
1859 quality, scalefactor,
1860 (title) ? title : filein,
1897 l_float32 scalefactor,
1902 l_int32 i, nbox, seq, bx, by, bw, bh, upscale;
1904 BOX *box, *boxc, *box2;
1905 PIX *pix, *pixt1, *pixt2, *pixt3, *pixt4, *pixt5, *pixt6;
1909 PROCNAME(
"pixConvertToPdfDataSegmented");
1912 return ERROR_INT(
"&data not defined", procName, 1);
1915 return ERROR_INT(
"&nbytes not defined", procName, 1);
1918 return ERROR_INT(
"pixs not defined", procName, 1);
1921 return ERROR_INT(
"invalid conversion type", procName, 1);
1922 if (boxa && (scalefactor <= 0.0 || scalefactor > 1.0)) {
1923 L_WARNING(
"setting scalefactor to 1.0\n", procName);
1929 res = DefaultInputRes;
1930 scale = (l_float32)((l_int32)(scalefactor * res + 0.5)) / (l_float32)res;
1931 cmap = pixGetColormap(pixs);
1935 if (pixGetDepth(pixs) > 1 && type ==
L_G4_ENCODE) {
1942 0, 0, 2 * res, title, NULL, 0);
1947 0, 0, res, title, NULL, 0);
1963 for (i = 0; i < nbox; i++) {
1973 if (pixGetDepth(pixt3) == 1)
1976 pixt4 =
pixScale(pixt3, scale, scale);
1978 0, 0, (l_int32)(scale * res), title,
1981 if (pixGetDepth(pixt1) == 1) {
2004 for (i = 0; i < nbox; i++) {
2008 if (pixGetDepth(pixt3) == 1)
2011 pixt4 =
pixScale(pixt3, scale, scale);
2016 bx, by, (l_int32)(scale * res), title,
2057 const char *fileout)
2062 PROCNAME(
"concatenatePdf");
2065 return ERROR_INT(
"dirname not defined", procName, 1);
2067 return ERROR_INT(
"fileout not defined", procName, 1);
2070 return ERROR_INT(
"sa not made", procName, 1);
2091 const char *fileout)
2097 PROCNAME(
"saConcatenatePdf");
2100 return ERROR_INT(
"sa not defined", procName, 1);
2102 return ERROR_INT(
"fileout not defined", procName, 1);
2106 return ERROR_INT(
"pdf data not made", procName, 1);
2127 const char *fileout)
2133 PROCNAME(
"ptraConcatenatePdf");
2136 return ERROR_INT(
"pa not defined", procName, 1);
2138 return ERROR_INT(
"fileout not defined", procName, 1);
2142 return ERROR_INT(
"pdf data not made", procName, 1);
2178 PROCNAME(
"concatenatePdfToData");
2181 return ERROR_INT(
"&data not defined", procName, 1);
2184 return ERROR_INT(
"&nbytes not defined", procName, 1);
2187 return ERROR_INT(
"dirname not defined", procName, 1);
2190 return ERROR_INT(
"sa not made", procName, 1);
2216 l_int32 i, npages, ret;
2220 PROCNAME(
"saConcatenatePdfToData");
2223 return ERROR_INT(
"&data not defined", procName, 1);
2226 return ERROR_INT(
"&nbytes not defined", procName, 1);
2229 return ERROR_INT(
"sa not defined", procName, 1);
2233 return ERROR_INT(
"no filenames found", procName, 1);
2235 for (i = 0; i < npages; i++) {
2245 for (i = 0; i < npages; i++) {
PIX * pixRemoveColormap(PIX *pixs, l_int32 type)
pixRemoveColormap()
l_ok ptraConcatenatePdfToData(L_PTRA *pa_data, SARRAY *sa, l_uint8 **pdata, size_t *pnbytes)
ptraConcatenatePdfToData()
PIX * pixScaleToGray(PIX *pixs, l_float32 scalefactor)
pixScaleToGray()
l_ok ptraGetActualCount(L_PTRA *pa, l_int32 *pcount)
ptraGetActualCount()
PIX * pixCreateTemplate(const PIX *pixs)
pixCreateTemplate()
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 boxaaReplaceBoxa(BOXAA *baa, l_int32 index, BOXA *boxa)
boxaaReplaceBoxa()
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 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_int32 boxaaGetCount(BOXAA *baa)
boxaaGetCount()
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 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 saConcatenatePdfToData(SARRAY *sa, l_uint8 **pdata, size_t *pnbytes)
saConcatenatePdfToData()
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()
PIX * pixConvertTo8(PIX *pixs, l_int32 cmapflag)
pixConvertTo8()
void lept_stderr(const char *fmt,...)
lept_stderr()
L_BYTEA * l_byteaInitFromMem(const l_uint8 *data, size_t size)
l_byteaInitFromMem()
PIX * pixScaleGray2xLIThresh(PIX *pixs, l_int32 thresh)
pixScaleGray2xLIThresh()
l_ok boxaaExtendWithInit(BOXAA *baa, l_int32 maxindex, BOXA *boxa)
boxaaExtendWithInit()
void boxaDestroy(BOXA **pboxa)
boxaDestroy()
l_ok pixWriteMemPdf(l_uint8 **pdata, size_t *pnbytes, PIX *pix, l_int32 res, const char *title)
pixWriteMemPdf()
l_ok cidConvertToPdfData(L_COMP_DATA *cid, const char *title, l_uint8 **pdata, size_t *pnbytes)
cidConvertToPdfData()
BOX * boxTransform(BOX *box, l_int32 shiftx, l_int32 shifty, l_float32 scalex, l_float32 scaley)
boxTransform()
l_ok pixNumColors(PIX *pixs, l_int32 factor, l_int32 *pncolors)
pixNumColors()
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()
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()
PIX * pixReadMem(const l_uint8 *data, size_t size)
pixReadMem()
PIX * pixClipRectangle(PIX *pixs, BOX *box, BOX **pboxc)
pixClipRectangle()
SARRAY * getNumberedPathnamesInDirectory(const char *dirname, const char *substr, l_int32 numpre, l_int32 numpost, l_int32 maxnum)
getNumberedPathnamesInDirectory()
l_ok concatenatePdfToData(const char *dirname, const char *substr, l_uint8 **pdata, size_t *pnbytes)
concatenatePdfToData()
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 l_binaryWrite(const char *filename, const char *operation, const void *data, size_t nbytes)
l_binaryWrite()
BOXA * pixConnComp(PIX *pixs, PIXA **ppixa, l_int32 connectivity)
pixConnComp()
l_ok convertUnscaledFilesToPdf(const char *dirname, const char *substr, const char *title, const char *fileout)
convertUnscaledFilesToPdf()
l_ok saConcatenatePdf(SARRAY *sa, const char *fileout)
saConcatenatePdf()
L_PTRA * ptraCreate(l_int32 n)
ptraCreate()
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 pixSetBlackOrWhite(PIX *pixs, l_int32 op)
pixSetBlackOrWhite()
l_ok findFileFormat(const char *filename, l_int32 *pformat)
findFileFormat()
char * sarrayGetString(SARRAY *sa, l_int32 index, l_int32 copyflag)
sarrayGetString()
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_BYTEA * l_byteaInitFromFile(const char *fname)
l_byteaInitFromFile()
PIX * pixClone(PIX *pixs)
pixClone()
void pixDestroy(PIX **ppix)
pixDestroy()
BOX * boxaGetBox(BOXA *boxa, l_int32 index, l_int32 accessflag)
boxaGetBox()
l_ok selectDefaultPdfEncoding(PIX *pix, l_int32 *ptype)
selectDefaultPdfEncoding()
SARRAY * getSortedPathnamesInDirectory(const char *dirname, const char *substr, l_int32 first, l_int32 nfiles)
getSortedPathnamesInDirectory()
l_ok splitPathAtDirectory(const char *pathname, char **pdir, char **ptail)
splitPathAtDirectory()
l_ok ptraConcatenatePdf(L_PTRA *pa, const char *fileout)
ptraConcatenatePdf()
l_ok pixGetDimensions(const PIX *pix, l_int32 *pw, l_int32 *ph, l_int32 *pd)
pixGetDimensions()
BOXAA * boxaaCreate(l_int32 n)
boxaaCreate()
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()
void ptraDestroy(L_PTRA **ppa, l_int32 freeflag, l_int32 warnflag)
ptraDestroy()
l_int32 sarrayGetCount(SARRAY *sa)
sarrayGetCount()
l_ok ptraAdd(L_PTRA *pa, void *item)
ptraAdd()
PIX * pixRead(const char *filename)
pixRead()
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 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 convertUnscaledToPdfData(const char *fname, const char *title, l_uint8 **pdata, size_t *pnbytes)
convertUnscaledToPdfData()
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 saConvertUnscaledFilesToPdf(SARRAY *sa, const char *title, const char *fileout)
saConvertUnscaledFilesToPdf()
BOXAA * convertNumberedMasksToBoxaa(const char *dirname, const char *substr, l_int32 numpre, l_int32 numpost)
convertNumberedMasksToBoxaa()
PIX * pixaGetPix(PIXA *pixa, l_int32 index, l_int32 accesstype)
pixaGetPix()
l_ok l_generateCIDataForPdf(const char *fname, PIX *pix, l_int32 quality, L_COMP_DATA **pcid)
l_generateCIDataForPdf()
void * ptraRemove(L_PTRA *pa, l_int32 index, l_int32 flag)
ptraRemove()
l_ok boxaaInitFull(BOXAA *baa, BOXA *boxa)
boxaaInitFull()
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()
BOXA * boxaCreate(l_int32 n)
boxaCreate()
l_ok saConvertUnscaledFilesToPdfData(SARRAY *sa, const char *title, l_uint8 **pdata, size_t *pnbytes)
saConvertUnscaledFilesToPdfData()
void boxDestroy(BOX **pbox)
boxDestroy()
l_int32 boxaGetCount(BOXA *boxa)
boxaGetCount()
void l_byteaDestroy(L_BYTEA **pba)
l_byteaDestroy()
l_ok boxGetGeometry(BOX *box, l_int32 *px, l_int32 *py, l_int32 *pw, l_int32 *ph)
boxGetGeometry()
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()
PIX * pixScale(PIX *pixs, l_float32 scalex, l_float32 scaley)
pixScale()
l_ok concatenatePdf(const char *dirname, const char *substr, const char *fileout)
concatenatePdf()
l_int32 pixaGetCount(PIXA *pixa)
pixaGetCount()
PIX * pixSetBlackOrWhiteBoxa(PIX *pixs, BOXA *boxa, l_int32 op)
pixSetBlackOrWhiteBoxa()
BOXA * boxaaGetBoxa(BOXAA *baa, l_int32 index, l_int32 accessflag)
boxaaGetBoxa()
void sarrayDestroy(SARRAY **psa)
sarrayDestroy()