Leptonica  1.82.0
Image processing and image analysis suite
convertfiles.c File Reference
#include <string.h>
#include "allheaders.h"

Go to the source code of this file.

Functions

l_ok 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)
 

Detailed Description


     Conversion to 1 bpp
         l_int32    convertFilesTo1bpp()

 These are utility functions that will perform depth conversion
 on selected files, writing the results to a specified directory.
 We start with conversion to 1 bpp.

Definition in file convertfiles.c.

Function Documentation

◆ convertFilesTo1bpp()

l_ok 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()

Parameters
[in]dirin
[in]substr[optional] substring filter on filenames; 8 can be NULL
[in]upscaling1, 2 or 4; only for input color or grayscale
[in]threshglobal threshold for binarization; 0 for default
[in]firstpage
[in]npagesuse 0 to do all from firstpage to the end
[in]dirout
[in]outformatIFF_PNG, IFF_TIFF_G4
Returns
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.
  

Definition at line 71 of file convertfiles.c.