- /** Loads an image from a file and uploads it to the texture. If storage
- has not been defined, it will be set to match the loaded image. Otherwise
- the image must be compatible with the defined storage. */
- void load_image(const std::string &fn);
+ /// Loads a Graphics::Image from a file and uploads it to the texture.
+ void load_image(const std::string &fn, bool srgb = false);
+
+ /** Uploads an image to the texture. If storage has not been defined, it
+ will be set to match the image. Otherwise the image must be compatible with
+ the defined storage.
+
+ If srgb is true and storage is determined by this call, then an sRGB pixel
+ format will be used. */
+ void image(const Graphics::Image &, bool srgb = false);