6#include "fifechan/image.hpp"
13#include "fifechan/platform.hpp"
16#include "fifechan/exception.hpp"
17#include "fifechan/imageloader.hpp"
24 Image::Image() =
default;
26 Image::~Image() =
default;
30 assert(
"Image loader must not be null" && imageLoader !=
nullptr);
46 assert(
"Image loader must be set before loading" &&
mImageLoader !=
nullptr);
47 assert(
"Filename must not be empty" && !filename.empty());
Abstract interface for loading image assets.
static void resetImageLoader()
Resets the image loader used for loading images, detaching it from the Image class.
static Image * load(std::string const &filename, bool convertToDisplayFormat=true)
Loads an image by using the class' image loader.
virtual void convertToDisplayFormat()=0
Converts the image, if possible, to display format.
static void setImageLoader(ImageLoader *imageLoader)
Sets the ImageLoader to be used for loading images.
static ImageLoader * mImageLoader
Holds the image loader to be used when loading images.
static ImageLoader * getImageLoader()
Gets the image loader used for loading images.
Used replacement tokens by configure_file():