Leptonica  1.54
Файл convertfiles.c
#include <string.h>
#include "allheaders.h"

Функции

l_int32 convertFilesTo1bpp (const char *dirin, const char *substr, l_int32 upscaling, l_int32 thresh, l_int32 firstpage, l_int32 npages, const char *dirout, l_int32 outformat)
 

Функции

◆ convertFilesTo1bpp()

l_int32 convertFilesTo1bpp ( const char *  dirin,
const char *  substr,
l_int32  upscaling,
l_int32  thresh,
l_int32  firstpage,
l_int32  npages,
const char *  dirout,
l_int32  outformat 
)

convertFilesTo1bpp()

Input:  dirin
        substr (<optional> substring filter on filenames; can be NULL)
        upscaling (1, 2 or 4; only for input color or grayscale)
        thresh  (global threshold for binarization; use 0 for default)
        firstpage
        npages (use 0 to do all from @firstpage to the end)
        dirout
        outformat (IFF_PNG, IFF_TIFF_G4)
Return: 0 if OK, 1 on error

Notes: (1) Images are sorted lexicographically, and the names in the output directory are retained except for the extension.