1#ifndef TESSERACT_CCSTRUCT_DEBUGPIXA_H_
2#define TESSERACT_CCSTRUCT_DEBUGPIXA_H_
16 pixa_ = pixaCreate(0);
17#ifdef TESSERACT_DISABLE_DEBUG_FONTS
20 fonts_ = bmfCreate(
nullptr, 14);
33 int depth = pixGetDepth(pix);
34 int color = depth < 8 ? 1 : (depth > 8 ? 0x00ff0000 : 0x80);
36 pixAddSingleTextblock(pix, fonts_, caption, color, L_ADD_BELOW,
nullptr);
37 pixaAddPix(pixa_, pix_debug, L_INSERT);
43 if (pixaGetCount(pixa_) > 0) {
44 pixaConvertToPdf(pixa_, 300, 1.0f, 0, 0,
"AllDebugImages", filename);
void WritePDF(const char *filename)
void AddPix(const Image pix, const char *caption)