MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ save_texture_buffer()

bool MayaFlux::IO::save_texture_buffer ( const std::shared_ptr< Buffers::TextureBuffer > &  buffer,
const std::string &  filepath,
const ImageWriteOptions options = {} 
)

Save a TextureBuffer's current GPU state to disk.

Equivalent to download_texture_buffer() + save_image(). Most common entry point for writing rendered output to a file.

Definition at line 173 of file ImageExport.cpp.

177{
178 if (!buffer) {
179 MF_ERROR(Journal::Component::IO, Journal::Context::FileIO,
180 "save_texture_buffer: null buffer");
181 return false;
182 }
183 auto image = buffer->get_gpu_texture();
184 if (!image) {
185 MF_ERROR(Journal::Component::IO, Journal::Context::FileIO,
186 "save_texture_buffer: buffer has no GPU texture");
187 return false;
188 }
189 return save_image(image, filepath, options);
190}
#define MF_ERROR(comp, ctx,...)
IO::ImageData image

References MayaFlux::Journal::FileIO, image, MayaFlux::Journal::IO, MF_ERROR, and save_image().

Referenced by save_text_buffer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: