MCPcopy Create free account
hub / github.com/devilsen/CZXing / SaveAsPBM

Function SaveAsPBM

czxing/src/main/cpp/zxing/src/BitMatrixIO.cpp:76–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76void SaveAsPBM(const BitMatrix& matrix, const std::string filename, int quietZone)
77{
78 auto out = ToMatrix<uint8_t>(Inflate(matrix.copy(), 0, 0, quietZone));
79 std::ofstream file(filename);
80 file << "P5\n" << out.width() << ' ' << out.height() << "\n255\n";
81 file.write(reinterpret_cast<const char*>(out.data()), out.size());
82}
83
84} // ZXing

Callers 3

DoDecodeFunction · 0.85
DetectPureQRFunction · 0.85
DecodePureFunction · 0.85

Calls 7

InflateFunction · 0.85
copyMethod · 0.45
widthMethod · 0.45
heightMethod · 0.45
writeMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected