Open a file for reading.
- Parameters
-
| filepath | Path to the file. |
| options | Reading options (see FileReadOptions). |
- Returns
- true if file was successfully opened.
Implements MayaFlux::IO::FileReader.
Definition at line 76 of file ImageReader.cpp.
77{
80 }
81
85 return false;
86 }
87
89
92 return false;
93 }
94
97
99 "Opened image: {} ({}x{}, {} channels)",
101
102 return true;
103}
#define MF_INFO(comp, ctx,...)
#define MF_ERROR(comp, ctx,...)
static std::optional< ImageData > load(const std::string &path, int desired_channels=4)
Load image from file (static utility)
std::optional< ImageData > m_image_data
void close() override
Close the currently open file.
bool can_read(const std::string &filepath) const override
Check if a file can be read by this reader.
@ FileIO
Filesystem I/O operations.
@ IO
Networking, file handling, streaming.
References can_read(), close(), MayaFlux::Journal::FileIO, MayaFlux::Journal::IO, load(), m_filepath, m_image_data, m_is_open, m_last_error, MF_ERROR, and MF_INFO.