| 205 | } |
| 206 | |
| 207 | static bool writeTextBitmapFloat(FILE *file, const float *values, int cols, int rows, int rowStride) { |
| 208 | for (int row = 0; row < rows; ++row) { |
| 209 | const float *cur = values; |
| 210 | for (int col = 0; col < cols; ++col) |
| 211 | fprintf(file, col ? " %.9g" : "%.9g", *cur++); |
| 212 | fprintf(file, "\n"); |
| 213 | values += rowStride; |
| 214 | } |
| 215 | return true; |
| 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) { |