| 158 | } |
| 159 | |
| 160 | BitMatrix Deflate(const BitMatrix& input, int width, int height, float top, float left, float subSampling) |
| 161 | { |
| 162 | BitMatrix result(width, height); |
| 163 | |
| 164 | for (int y = 0; y < result.height(); y++) { |
| 165 | auto yOffset = top + y * subSampling; |
| 166 | for (int x = 0; x < result.width(); x++) { |
| 167 | if (input.get(PointF(left + x * subSampling, yOffset))) |
| 168 | result.set(x, y); |
| 169 | } |
| 170 | } |
| 171 | |
| 172 | return result; |
| 173 | } |
| 174 | |
| 175 | } // ZXing |
| 176 |
no test coverage detected