#include <image.hpp>
|
| | Image1D (uint32_t wid, Channels chans, ChannelTy ty) |
| |
| | Image1D (std::string const &file) |
| |
| size_t | width () const |
| | return the width of the image
|
| |
| bool | write (const char *file) |
| |
| 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 () |
| |
◆ Image1D() [1/2]
create and allocate space for an uninitialized image
- Parameters
-
| wid | the width of the image |
| chans | the image format |
| ty | the type of the elements |
◆ Image1D() [2/2]
| cs237::Image1D::Image1D |
( |
std::string const & | file | ) |
|
create and initialize an image from a PNG file.
- Parameters
-
| file | the name of the PNG file |
◆ width()
| size_t cs237::Image1D::width |
( |
| ) |
const |
|
inline |
return the width of the image
◆ write()
| bool cs237::Image1D::write |
( |
const char * | file | ) |
|
write the texture to a file in PNG format
- Parameters
-
| file | the name of the PNG file |
- Returns
- true if successful, false otherwise
The documentation for this class was generated from the following file:
- /Users/jhr/Classes/23700/f2024/cs237-upstream/cs237-library/include/cs237/image.hpp