Image Provider factory.
More...
#include <provider_factory.h>
|
static PixelBuffer | load (const std::string &filename, const FileSystem &fs, const std::string &type=std::string(), bool srgb=false) |
| Loads an image file from 'filename', using the provider. More...
|
|
static PixelBuffer | load (const std::string &fullname, const std::string &type=std::string(), bool srgb=false) |
|
static PixelBuffer | load (IODevice &file, const std::string &type, bool srgb=false) |
|
static void | save (PixelBuffer buffer, const std::string &filename, FileSystem &fs, const std::string &type=std::string()) |
| Saves the given PixelBuffer to the file given by 'filename'. More...
|
|
static void | save (PixelBuffer buffer, const std::string &fullname, const std::string &type=std::string()) |
|
static void | save (PixelBuffer buffer, IODevice &file, const std::string &type) |
|
static PixelBuffer | try_load (const std::string &filename, const std::string &type=std::string(), const FileSystem &fs=FileSystem(), std::string *out_failure_reason=nullptr, bool srgb=false) |
| Attempts to load an image file from 'filename', using the provider identified by 'type'. More...
|
|
◆ load() [1/3]
Loads an image file from 'filename', using the provider.
identified by 'type'.
If the type is an empty string, it uses the extension of the filename to determine what type it is.
The virtual directory will be used as a the source.
◆ load() [2/3]
◆ load() [3/3]
◆ save() [1/3]
Saves the given PixelBuffer to the file given by 'filename'.
If the type is an empty string, it uses the extension of the filename to determine what type it is
◆ save() [2/3]
◆ save() [3/3]
◆ try_load()
Attempts to load an image file from 'filename', using the provider identified by 'type'.
- Returns
- If the function fails to load the image, a null pixel buffer object is returned.
If the type is an empty string, it uses the extension of the filename to determine what type it is.
The virtual directory will be used as a the source.
The documentation for this class was generated from the following file: