|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
| bool MayaFlux::IO::IOManager::save_image | ( | const std::shared_ptr< Core::VKImage > & | image, |
| const std::string & | filepath, | ||
| const IO::ImageWriteOptions & | options = {} |
||
| ) |
Save image data to disk asynchronously.
The source is downloaded from the GPU on the calling thread (must have command queue access) and the encode + disk flush is dispatched to a worker. Returns once the download completes and the encode task is queued; encode/flush failures are logged but do not block the caller.
For synchronous semantics (e.g. shutdown flush, tests) use the IO::save_image / IO::save_texture_buffer free functions in ImageExport.hpp.
The extension of filepath selects the writer via ImageWriterRegistry. Format-variant compatibility is the writer's responsibility (PNG wants uint8, EXR wants float, etc.).
Definition at line 655 of file IOManager.cpp.
References MayaFlux::IO::ImageWriterRegistry::create_writer(), MayaFlux::IO::download_image(), MayaFlux::Journal::FileIO, image, MayaFlux::IO::ImageWriterRegistry::instance(), MayaFlux::Journal::IO, m_save_tasks, m_save_tasks_mutex, MF_ERROR, and MF_INFO.
Referenced by save_image(), and save_image().
Here is the call graph for this function:
Here is the caller graph for this function: