|
| l_ok | convertFilesToPS (const char *dirin, const char *substr, l_int32 res, const char *fileout) |
| |
| l_ok | sarrayConvertFilesToPS (SARRAY *sa, l_int32 res, const char *fileout) |
| |
| l_ok | convertFilesFittedToPS (const char *dirin, const char *substr, l_float32 xpts, l_float32 ypts, const char *fileout) |
| |
| l_ok | sarrayConvertFilesFittedToPS (SARRAY *sa, l_float32 xpts, l_float32 ypts, const char *fileout) |
| |
| l_ok | writeImageCompressedToPSFile (const char *filein, const char *fileout, l_int32 res, l_int32 *pindex) |
| |
| l_ok | convertSegmentedPagesToPS (const char *pagedir, const char *pagestr, l_int32 page_numpre, const char *maskdir, const char *maskstr, l_int32 mask_numpre, l_int32 numpost, l_int32 maxnum, l_float32 textscale, l_float32 imagescale, l_int32 threshold, const char *fileout) |
| |
| l_ok | pixWriteSegmentedPageToPS (PIX *pixs, PIX *pixm, l_float32 textscale, l_float32 imagescale, l_int32 threshold, l_int32 pageno, const char *fileout) |
| |
| l_ok | pixWriteMixedToPS (PIX *pixb, PIX *pixc, l_float32 scale, l_int32 pageno, const char *fileout) |
| |
| l_ok | convertToPSEmbed (const char *filein, const char *fileout, l_int32 level) |
| |
| l_ok | pixaWriteCompressedToPS (PIXA *pixa, const char *fileout, l_int32 res, l_int32 level) |
| |
| l_ok | pixWriteCompressedToPS (PIX *pix, const char *fileout, l_int32 res, l_int32 level, l_int32 *pindex) |
| |
|=============================================================|
| Important note |
|=============================================================|
| Some of these functions require I/O libraries such as |
| libtiff, libjpeg, and libz. If you do not have these |
| libraries, some calls will fail. |
| |
| You can manually deactivate all PostScript writing by |
| setting this in environ.h: |
| |
| #define USE_PSIO 0 |
|
|
| in environ.h. This will link psio1stub.c |
|=============================================================|
This is a PostScript "device driver" for wrapping images
in PostScript. The images can be rendered by a PostScript
interpreter for viewing, using evince or gv. They can also be
rasterized for printing, using gs or an embedded interpreter
in a PostScript printer. And they can be converted to a pdf
using gs (ps2pdf).
Convert specified files to PS
l_int32 convertFilesToPS()
l_int32 sarrayConvertFilesToPS()
l_int32 convertFilesFittedToPS()
l_int32 sarrayConvertFilesFittedToPS()
l_int32 writeImageCompressedToPSFile()
Convert mixed text/image files to PS
l_int32 convertSegmentedPagesToPS()
l_int32 pixWriteSegmentedPageToPS()
l_int32 pixWriteMixedToPS()
Convert any image file to PS for embedding
l_int32 convertToPSEmbed()
Write all images in a pixa out to PS
l_int32 pixaWriteCompressedToPS()
l_int32 pixWriteCompressedToPS()
These PostScript converters are used in three different ways.
(1) For embedding a PS file in a program like TeX.
convertToPSEmbed() handles this for levels 1, 2 and 3 output,
and prog/converttops wraps this in an executable.
converttops is a generalization of Thomas Merz's jpeg2ps wrapper,
in that it works for all types (formats, depth, colormap)
of input images and gives PS output in one of these formats
* level 1 (uncompressed)
* level 2 (compressed ccittg4 or dct)
* level 3 (compressed flate)
(2) For composing a set of pages with any number of images
painted on them, in either level 2 or level 3 formats.
(3) For printing a page image or a set of page images, at a
resolution that optimally fills the page, using
convertFilesFittedToPS().
The top-level calls of utilities in category 2, which can compose
multiple images on a page, and which generate a PostScript file for
printing or display (e.g., conversion to pdf), are:
convertFilesToPS()
convertFilesFittedToPS()
convertSegmentedPagesToPS()
All images are output with page numbers. Bounding box hints are
more subtle. They must be included for embeding images in
TeX, for example, and the low-level writers include bounding
box hints by default. However, these hints should not be included for
multi-page PostScript that is composed of a sequence of images;
consequently, they are not written when calling higher level
functions such as convertFilesToPS(), convertFilesFittedToPS()
and convertSegmentedPagesToPS(). The function l_psWriteBoundingBox()
sets a flag to give low-level control over this.
Definition in file psio1.c.