void wbExport(const char *file, wbExportKind_t kind, void *data, int rows, int columns, wbType_t type) { wbExport_t exprt; if (file == nullptr) { return; } exprt = wbExport_open(file, kind); wbExport_write(exprt, data, rows, columns, type); wbExport_close(exprt); }
void wbExport(const char *file, wbReal_t *data, int rows, int columns) { wbExportKind_t kind; wbExport_t exprt; if (file == NULL) { return; } kind = _parseExportExtension(file); exprt = wbExport_open(file, kind); wbExport_write(exprt, data, rows, columns, wbType_real); wbExport_close(exprt); }
void wbExport(const char *file, unsigned char *data, int rows, int columns) { wbExportKind_t kind; wbExport_t exprt; if (file == nullptr) { return; } kind = _parseExportExtension(file); exprt = wbExport_open(file, kind); wbExport_write(exprt, data, rows, columns, wbType_ubit8); wbExport_close(exprt); }
void wbExport(const char *file, wbImage_t img) { wbExportKind_t kind; wbExport_t exprt; if (file == NULL) { return; } kind = _parseExportExtension(file); exprt = wbExport_open(file, kind); wbAssert(kind == wbExportKind_ppm); wbExport_writeAsImage(exprt, img); wbExport_close(exprt); }