Leptonica 1.68
C Image Processing Library
|
Regression test for writing a block of text in one of 4 locations relative to a pix. This tests writing on 8 different types of images. More...
#include "allheaders.h"
Go to the source code of this file.
Functions | |
void | AddTextAndSave (PIXA *pixa, PIX *pixs, L_BMF *bmf, const char *textstr, l_int32 location, l_uint32 val) |
main (int argc, char **argv) | |
Variables | |
const char * | textstr [] |
const char * | topstr [] |
const l_uint32 | colors [6] |
Regression test for writing a block of text in one of 4 locations relative to a pix. This tests writing on 8 different types of images.
Definition in file writetext_reg.c.
void AddTextAndSave | ( | PIXA * | pixa, |
PIX * | pixs, | ||
L_BMF * | bmf, | ||
const char * | textstr, | ||
l_int32 | location, | ||
l_uint32 | val | ||
) |
Definition at line 142 of file writetext_reg.c.
References pixAddSingleTextblock(), pixaGetCount(), pixDestroy(), and pixSaveTiledOutline().
main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 49 of file writetext_reg.c.
References AddTextAndSave(), bmfCreate(), bmfDestroy(), buf, colors, L_RegParams::display, IFF_PNG, L_ADD_ABOVE, L_COPY, L_EUCLIDEAN_DISTANCE, L_NOCOPY, NULL, pixaCreate(), pixAddSingleTextblock(), pixaDestroy(), pixaDisplay(), pixConvertTo32(), pixConvertTo8(), pixDestroy(), pixDisplayWithTitle(), pixGetColormap(), pixQuantFromCmap(), pixRead(), pixScale(), pixSetTextline(), pixThresholdOn8bpp(), pixThresholdTo2bpp(), pixThresholdTo4bpp(), pixThresholdToBinary(), regTestCleanup(), regTestSetup(), regTestWritePixAndCheck(), sarrayAddString(), sarrayCreate(), sarrayDestroy(), sarrayGetString(), textstr, and topstr.
const char* textstr[] |
{"This is a simple test of text writing: 8 bpp", "This is a simple test of text writing: 32 bpp", "This is a simple test of text writing: 8 bpp cmapped", "This is a simple test of text writing: 4 bpp cmapped", "This is a simple test of text writing: 4 bpp", "This is a simple test of text writing: 2 bpp cmapped", "This is a simple test of text writing: 2 bpp", "This is a simple test of text writing: 1 bpp"}
Definition at line 29 of file writetext_reg.c.
const char* topstr[] |
{"Text is added above each image", "Text is added over the top of each image", "Text is added over the bottom of each image", "Text is added below each image"}
Definition at line 39 of file writetext_reg.c.
Referenced by main().
{0x4090e000, 0x40e09000, 0x9040e000, 0x90e04000, 0xe0409000, 0xe0904000}
Definition at line 45 of file writetext_reg.c.
Referenced by main().