19#define PROMEKI_REGISTER_IMAGEFILEIO(name) [[maybe_unused]] static int PROMEKI_CONCAT(__promeki_imagefileio_, PROMEKI_UNIQUE_ID) = \
20 ImageFileIO::registerImageFileIO(new name);
Lightweight error code wrapper for the promeki library.
Definition error.h:39
Abstract backend for image file format I/O.
Definition imagefileio.h:35
virtual ~ImageFileIO()
Virtual destructor.
Definition imagefileio.h:55
bool _canSave
Whether saving is supported.
Definition imagefileio.h:114
int _id
Format identifier.
Definition imagefileio.h:112
String name() const
Returns the human-readable name of this backend.
Definition imagefileio.h:93
ImageFileIO()=default
Default constructor.
int id() const
Returns the format identifier for this backend.
Definition imagefileio.h:61
bool canSave() const
Returns true if this backend supports saving images.
Definition imagefileio.h:85
virtual Error load(ImageFile &imageFile) const
Loads an image from a file into the given ImageFile.
bool canLoad() const
Returns true if this backend supports loading images.
Definition imagefileio.h:77
bool _canLoad
Whether loading is supported.
Definition imagefileio.h:113
static int registerImageFileIO(ImageFileIO *object)
Registers an ImageFileIO backend in the global registry.
virtual Error save(ImageFile &imageFile) const
Saves the image from the given ImageFile to disk.
bool isValid() const
Returns true if this backend has a valid (non-zero) format ID.
Definition imagefileio.h:69
String _name
Human-readable format name.
Definition imagefileio.h:115
static const ImageFileIO * lookup(int id)
Looks up a registered backend by format ID.
Image file loader and saver.
Definition imagefile.h:27
Dynamic array container wrapping std::vector.
Definition list.h:40
Encoding-aware string class with copy-on-write semantics.
Definition string.h:35
#define PROMEKI_NAMESPACE_BEGIN
Starts a promeki namespace block.
Definition namespace.h:14
#define PROMEKI_NAMESPACE_END
Ends a promeki namespace block.
Definition namespace.h:19