CMSC23700 Common Code Library
Support code for CS23700 programming projects
Loading...
Searching...
No Matches
cs237::__detail::ImageBase Class Reference

#include <cs237-image.hpp>

Inheritance diagram for cs237::__detail::ImageBase:

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
 
voiddata () 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
 

Constructor & Destructor Documentation

◆ ImageBase() [1/3]

cs237::__detail::ImageBase::ImageBase ( )
inlineexplicitprotected

◆ ImageBase() [2/3]

cs237::__detail::ImageBase::ImageBase ( uint32_t  nd)
inlineexplicitprotected

◆ ImageBase() [3/3]

cs237::__detail::ImageBase::ImageBase ( uint32_t  nd,
Channels  chans,
ChannelTy  ty,
size_t  nPixels 
)
explicitprotected

◆ ~ImageBase()

virtual cs237::__detail::ImageBase::~ImageBase ( )
protectedvirtual

Member Function Documentation

◆ addAlphaChannel()

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.

◆ channels()

Channels cs237::__detail::ImageBase::channels ( ) const
inline

return the format of the pixels.

◆ data()

void * cs237::__detail::ImageBase::data ( ) const
inline

the data pointer

◆ format()

vk::Format cs237::__detail::ImageBase::format ( ) const
inline

return the vulkan format of the image data

◆ nBytes()

size_t cs237::__detail::ImageBase::nBytes ( ) const
inline

the total number of bytes of image data

◆ nBytesPerPixel()

size_t cs237::__detail::ImageBase::nBytesPerPixel ( ) const

the number of bytes per pixel

◆ nChannels()

unsigned int cs237::__detail::ImageBase::nChannels ( ) const

the number of channels (1, 2, 3, or 4)

◆ nDims()

uint32_t cs237::__detail::ImageBase::nDims ( ) const
inline

the number of dimensions (1, 2, or 3)

◆ type()

ChannelTy cs237::__detail::ImageBase::type ( ) const
inline

returns the type of the channels

Member Data Documentation

◆ _chans

Channels cs237::__detail::ImageBase::_chans
protected

the texture format

◆ _data

void* cs237::__detail::ImageBase::_data
protected

the raw image data

◆ _nBytes

size_t cs237::__detail::ImageBase::_nBytes
protected

size in bytes of image data

◆ _nDims

uint32_t cs237::__detail::ImageBase::_nDims
protected

the number of dimensions (1 or 2)

◆ _sRGB

bool cs237::__detail::ImageBase::_sRGB
protected

should the image be interpreted as an sRGB encoded image?

◆ _type

ChannelTy cs237::__detail::ImageBase::_type
protected

the representation type of the data


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