Leptonica 1.85.0
Image processing and image analysis suite
Loading...
Searching...
No Matches
partify.c File Reference
#include "allheaders.h"

Go to the source code of this file.

Functions

static BOXApixLocateStaveSets (PIX *pixs, l_int32 pageno, PIXA *pixadb)
 
static l_ok boxaRemoveVGaps (BOXA *boxa)
 
l_ok partifyFiles (const char *dirname, const char *substr, l_int32 nparts, const char *outroot, const char *debugfile)
 
l_ok partifyPixac (PIXAC *pixac, l_int32 nparts, const char *outroot, PIXA *pixadb)
 

Detailed Description


    Top level
        l_int32          partifyFiles()
        l_int32          partifyPixac()

    Helpers
        static BOXA     *pixLocateStaveSets()
        static l_int32   boxaRemoveVGaps()

Definition in file partify.c.

Function Documentation

◆ boxaRemoveVGaps()

static l_ok boxaRemoveVGaps ( BOXA * boxa)
static

Definition at line 300 of file partify.c.

◆ partifyFiles()

l_ok partifyFiles ( const char * dirname,
const char * substr,
l_int32 nparts,
const char * outroot,
const char * debugfile )

partifyFiles()

Parameters
[in]dirnamedirectory of files
[in]substrrequired filename substring; use NULL for all files
[in]npartsnumber of parts to generate (counting from top)
[in]outrootroot name of output pdf files
[in]debugfile[optional] set to NULL for no debug output
Returns
0 if OK, 1 on error
Notes:
     (1) All page images are compressed in png format into a pixacomp.
     (2) Each page image is deskewed, binarized at 300 ppi,
         partified into nparts, and saved in a set of pixacomps
         in tiff-g4 format.
     (3) Each partified pixacomp is rendered into a set of page images,
         and output as a pdf.

Definition at line 75 of file partify.c.

References L_FLATE_ENCODE, and partifyPixac().

◆ partifyPixac()

l_ok partifyPixac ( PIXAC * pixac,
l_int32 nparts,
const char * outroot,
PIXA * pixadb )

partifyPixac()

Parameters
[in]pixacwith at least one image
[in]npartsnumber of parts to generate (counting from top)
[in]outrootroot name of output pdf files
[in]pixadb[optional] debug pixa; can be NULL
Returns
0 if OK, 1 on error
Notes:
     (1) See partifyPixac().
     (2) If the image files do not have a resolution, 300 ppi is assumed.

Definition at line 121 of file partify.c.

References L_ADD_LEFT, L_COPY, L_G4_ENCODE, L_SORT_BY_Y, and L_SORT_INCREASING.

Referenced by partifyFiles().

◆ pixLocateStaveSets()

static BOXA * pixLocateStaveSets ( PIX * pixs,
l_int32 pageno,
PIXA * pixadb )
static

Definition at line 249 of file partify.c.