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

◆ choose_image()

MAYAFLUX_API std::shared_ptr< Buffers::TextureBuffer > MayaFlux::choose_image ( )

Present a native open-file dialog filtered to image formats and load the chosen file via IOManager::load_image().

Blocks until the user confirms or cancels. Returns nullptr on cancellation, backend error, or if Portal::System is not initialized.

Definition at line 144 of file Depot.cpp.

145{
146 if (!require_portal("choose_image"))
147 return nullptr;
148
149 return Portal::System::Dialog::open_file<std::shared_ptr<Buffers::TextureBuffer>>(
150 [](const fs::path& p) { return get_io_manager()->load_image(p.string()); },
151 [](Core::SystemDialogError) { },
152 k_image_filters);
153}
std::shared_ptr< IO::IOManager > get_io_manager()
Retrieves the global IOManager instance for file loading and buffer management.
Definition Depot.cpp:256

References get_io_manager().

Referenced by MayaFlux::Creator::read_image().

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