| 245 | } |
| 246 | |
| 247 | bool export_octave_raw(const std::uint8_t* data, |
| 248 | const BufferType type, |
| 249 | const int width, |
| 250 | const int height, |
| 251 | const int channels, |
| 252 | const int step, |
| 253 | const std::string& path) { |
| 254 | using enum BufferType; |
| 255 | switch (type) { |
| 256 | case UnsignedByte: |
| 257 | return export_octave_impl<std::uint8_t>( |
| 258 | data, width, height, channels, step, path); |
| 259 | case UnsignedShort: |
| 260 | return export_octave_impl<std::uint16_t>( |
| 261 | data, width, height, channels, step, path); |
| 262 | case Short: |
| 263 | return export_octave_impl<std::int16_t>( |
| 264 | data, width, height, channels, step, path); |
| 265 | case Int32: |
| 266 | return export_octave_impl<std::int32_t>( |
| 267 | data, width, height, channels, step, path); |
| 268 | case Float32: |
| 269 | [[fallthrough]]; |
| 270 | case Float64: |
| 271 | return export_octave_impl<float>( |
| 272 | data, width, height, channels, step, path); |
| 273 | } |
| 274 | return false; |
| 275 | } |
| 276 | |
| 277 | } // namespace oid::BufferExporter |
no outgoing calls