40 #ifndef H_OGF_IMAGE_TYPES_IMAGE_LIBRARY_H
41 #define H_OGF_IMAGE_TYPES_IMAGE_LIBRARY_H
61 class ImageSerializer;
179 const std::string& name, std::string& value
186 const std::string& name,
const std::string& value
196 std::map<std::string, ImageSerializer_var> image_serializers_;
197 std::map<std::string, Image_var> images_;
Manages the ImageSerializer repository and the named images.
bool set_local_value(const std::string &name, const std::string &value) override
Sets a variable value locally.
static ImageLibrary * instance()
Gets the instance.
static void terminate()
Terminates the ImageLibrary instance.
bool get_local_value(const std::string &name, std::string &value) const override
Retrieves a variable value locally.
bool unbind_image(const std::string &name)
Unbinds a named image.
Image * load_image(const std::string &file_name)
Loads an image from a file.
bool bind_image(const std::string &name, Image *image)
Binds an image with a name.
Image * resolve_image(const std::string &name) const
Finds an image by name.
bool save_image(const std::string &file_name, Image *image)
Saves an image into a file.
bool bind_image_serializer(const std::string &extension, ImageSerializer *serializer)
Binds an ImageSerializer.
void copy_image_to_clipboard(Image *image)
Copies an image to the clipboard of the operating system.
ImageSerializer * resolve_image_serializer(const std::string &extension) const
Finds an ImageSerializer by extension.
static void initialize()
Initializes the ImageLibrary instance.
Declares an image serializer for a given extension.
geo_declare_image_serializer(const std::string &extension)
Declares an image serializer for a given extension.
Provides a mechanism to store global variables, retrieve them by their names and attach observers to ...
Common include file, providing basic definitions. Should be included before anything else by all head...
Class to draw triangles in an image.
std::string extension(const std::string &path)
Gets a path extension.
Global Vorpaline namespace.