libdonut  2.3.2
Application framework for cross-platform game development in C++20
Public Attributes | List of all members
donut::graphics::ImageOptions Struct Reference

Options for loading an image. More...

#include <donut/graphics/Image.hpp>

Public Attributes

std::optional< PixelFormatdesiredFormat {}
 If set, request the loaded image to be converted to this format. More...
 
bool highDynamicRange = false
 Load and store the image with high dynamic range. More...
 
bool flipVertically = false
 Flip the loaded image vertically. More...
 

Detailed Description

Options for loading an image.

Member Data Documentation

◆ desiredFormat

std::optional<PixelFormat> donut::graphics::ImageOptions::desiredFormat {}

If set, request the loaded image to be converted to this format.

◆ highDynamicRange

bool donut::graphics::ImageOptions::highDynamicRange = false

Load and store the image with high dynamic range.

If set to true, the pixel component type will be PixelComponentType::F32. Otherwise, the component type is PixelComponentType::U8.

If the loaded image is high dynamic range and this option is set to false, or vice versa, the image is automatically gamma corrected from sRGB to linear color or converted from linear color to sRGB, assuming a gamma value of 2.2 in both cases.

◆ flipVertically

bool donut::graphics::ImageOptions::flipVertically = false

Flip the loaded image vertically.


The documentation for this struct was generated from the following file: