clan::ImageImportDescription Class Reference - ClanLib SDK
Description: clan::ImageImportDescription Class Reference

Public Member Functions | List of all members
clan::ImageImportDescription Class Reference
clanDisplay Display

Image Import Description Class. More...

`#include <image_import_description.h>`

## Public Member Functions
| ImageImportDescription ()
| Constructs a image import description with default values.
| ~ImageImportDescription ()
bool | flip_vertical () const
| Returns the flip vertical setting.
std::function< PixelBuffer(PixelBuffer &)> & | func_process ()
| User defined fine control of the pixel buffer.
bool | get_premultiply_alpha () const
| Returns the premultiply alpha setting.
bool | is_cached () const
| Returns if this image should be cached.
bool | is_srgb () const
| Returns the sRGB setting.
PixelBuffer | process (PixelBuffer &image) const
| Process the pixel buffers depending of the chosen settings.
void | set_cached (bool enable)
| Controls if this image can be cached.
void | set_flip_vertical (bool enable)
| Set the flip vertical setting.
void | set_premultiply_alpha (bool enable)
| Set the premultiply alpha setting.
void | set_srgb (bool enable)
| Controls if the image is uploaded as a sRGB texture or not.

## Detailed Description

Image Import Description Class.

This class allows you to setup a more advanced description when importing images.

## Constructor & Destructor Documentation

## ◆ ImageImportDescription()

clan::ImageImportDescription::ImageImportDescription | ( |  | ) |

Constructs a image import description with default values.

## ◆ ~ImageImportDescription()

clan::ImageImportDescription::~ImageImportDescription | ( |  | ) |

## Member Function Documentation

## ◆ flip_vertical()

bool clan::ImageImportDescription::flip_vertical | ( |  | ) | const

Returns the flip vertical setting.

## ◆ func_process()

std::function< PixelBuffer(PixelBuffer &)> & clan::ImageImportDescription::func_process | ( |  | ) |

User defined fine control of the pixel buffer.

Note, the output maybe different to the input, if desired
PixelBuffer func_process(PixelBuffer &input)

## ◆ get_premultiply_alpha()

bool clan::ImageImportDescription::get_premultiply_alpha | ( |  | ) | const

Returns the premultiply alpha setting.

## ◆ is_cached()

bool clan::ImageImportDescription::is_cached | ( |  | ) | const

Returns if this image should be cached.

## ◆ is_srgb()

bool clan::ImageImportDescription::is_srgb | ( |  | ) | const

Returns the sRGB setting.

## ◆ process()

PixelBuffer clan::ImageImportDescription::process | ( | PixelBuffer & | image | ) | const

Process the pixel buffers depending of the chosen settings.

Note, the output may point to a different pixel buffer than the input
The input image may be written to.

## ◆ set_cached()

void clan::ImageImportDescription::set_cached | ( | bool | enable | ) |

Controls if this image can be cached.

(This defaults to true)

## ◆ set_flip_vertical()

void clan::ImageImportDescription::set_flip_vertical | ( | bool | enable | ) |

Set the flip vertical setting.

(This defaults to off)

## ◆ set_premultiply_alpha()

void clan::ImageImportDescription::set_premultiply_alpha | ( | bool | enable | ) |

Set the premultiply alpha setting.

(This defaults to off)

## ◆ set_srgb()

void clan::ImageImportDescription::set_srgb | ( | bool | enable | ) |

Controls if the image is uploaded as a sRGB texture or not.

(This defaults to off)

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

- image_import_description.h