![]() |
CMSC23740 Common Code Library
Support code for CS23740 programming projects
|
#include <image.hpp>

Public Member Functions | |
| uint32_t | nDims () const |
| the number of dimensions (1, 2, or 3) | |
| Channels | channels () const |
| return the format of the pixels. | |
| ChannelTy | type () const |
| returns the type of the channels | |
| vk::Format | format () const |
| return the vulkan format of the image data | |
| void * | data () const |
| the data pointer | |
| size_t | nBytes () const |
| the total number of bytes of image data | |
| unsigned int | nChannels () const |
| the number of channels (1, 2, 3, or 4) | |
| size_t | nBytesPerPixel () const |
| the number of bytes per pixel | |
| void | addAlphaChannel () |
Protected Member Functions | |
| ImageBase () | |
| ImageBase (uint32_t nd) | |
| ImageBase (uint32_t nd, Channels chans, ChannelTy ty, size_t nPixels) | |
| virtual | ~ImageBase () |
Protected Attributes | |
| uint32_t | _nDims |
| the number of dimensions (1 or 2) | |
| Channels | _chans |
| the texture format | |
| ChannelTy | _type |
| the representation type of the data | |
| bool | _sRGB |
| should the image be interpreted as an sRGB encoded image? | |
| size_t | _nBytes |
| size in bytes of image data | |
| void * | _data |
| the raw image data | |
|
inlineexplicitprotected |
|
inlineexplicitprotected |
|
explicitprotected |
|
protectedvirtual |
| void cs237::__detail::ImageBase::addAlphaChannel | ( | ) |
add an opaque alpha channel to the imag
This operation only works on images with RGB or BGR pixel format; and is a no-op for other formats. It is necessary, because many Vulkan implementations do not support 24-bit pixels.
|
inline |
return the format of the pixels.
|
inline |
the data pointer
|
inline |
return the vulkan format of the image data
|
inline |
the total number of bytes of image data
| size_t cs237::__detail::ImageBase::nBytesPerPixel | ( | ) | const |
the number of bytes per pixel
| unsigned int cs237::__detail::ImageBase::nChannels | ( | ) | const |
the number of channels (1, 2, 3, or 4)
|
inline |
the number of dimensions (1, 2, or 3)
|
inline |
returns the type of the channels
|
protected |
the texture format
|
protected |
the raw image data
|
protected |
size in bytes of image data
|
protected |
the number of dimensions (1 or 2)
|
protected |
should the image be interpreted as an sRGB encoded image?
|
protected |
the representation type of the data