| 216 | } |
| 217 | |
| 218 | static bool writeBinBitmap(FILE *file, const float *values, int cols, int rows, int rowStride) { |
| 219 | for (int row = 0; row < rows; ++row) { |
| 220 | const float *cur = values; |
| 221 | for (int col = 0; col < cols; ++col) { |
| 222 | byte v = pixelFloatToByte(*cur++); |
| 223 | fwrite(&v, 1, 1, file); |
| 224 | } |
| 225 | values += rowStride; |
| 226 | } |
| 227 | return true; |
| 228 | } |
| 229 | |
| 230 | #ifdef __BIG_ENDIAN__ |
| 231 | static bool writeBinBitmapFloatBE(FILE *file, const float *values, int cols, int rows, int rowStride) |
no test coverage detected