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

Function ToBitMatrix

czxing/src/main/cpp/zxing/src/BitMatrix.h:177–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175
176template<typename T>
177BitMatrix ToBitMatrix(const Matrix<T>& in, T trueValue = {true})
178{
179 BitMatrix out(in.width(), in.height());
180 for (int y = 0; y < in.height(); ++y)
181 for (int x = 0; x < in.width(); ++x)
182 if (in.get(x, y) == trueValue)
183 out.set(x, y);
184 return out;
185}
186
187template<typename T>
188Matrix<T> ToMatrix(const BitMatrix& in, T black = 0, T white = ~0)

Callers 1

EncodeFunction · 0.85

Calls 4

widthMethod · 0.45
heightMethod · 0.45
getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected