API Documentation
Image.h
1 // Image.h
3 //
5 
6 namespace nkImages
7 {
13  class Image final : public ImageBase
14  {
15  public :
16 
20  Image () noexcept ;
26  Image (nkMemory::Buffer&& data) noexcept ;
39  Image (nkMemory::Buffer&& data, unsigned int width, unsigned int height, unsigned int depth, PIXEL_FORMAT format, unsigned int pixelOrBlockByteSize = 0, unsigned int rowByteSize = 0, unsigned int sliceByteSize = 0) noexcept ;
54  Image (nkMemory::Buffer&& data, unsigned int width, unsigned int height, unsigned int depth, unsigned int arraySize, unsigned int mips, PIXEL_FORMAT format, unsigned int pixelOrBlockByteSize = 0) noexcept ;
65  Image (nkMemory::Buffer&& data, nkMemory::BufferCast<ImageDescriptor>&& images, PIXEL_FORMAT format, unsigned int pixelOrBlockByteSize, bool alphaPremultiplied = false, bool cubeMap = false) noexcept ;
72  Image (const Image& other) noexcept ;
79  Image (Image&& other) noexcept ;
86  Image (const ImageView& view) noexcept ;
90  virtual ~Image () ;
91 
92  // Data access
93  virtual unsigned char* getDataPtr () const override ;
94  virtual unsigned long long getDataByteSize () const override ;
95  virtual nkMemory::BufferView<> getDataBuffer () const override ;
96  virtual bool isView () const override ;
100  const nkMemory::Buffer& getData () const ;
101 
102  // Operators
108  Image& operator= (const Image& other) noexcept ;
114  Image& operator= (Image&& other) noexcept ;
115  } ;
116 }
nkImages::Image::getDataBuffer
virtual nkMemory::BufferView getDataBuffer() const override
nkImages::ImageView
Holds all information required for an image, with no ownership over the data.
Definition: ImageView.h:14
nkImages::Image::getDataByteSize
virtual unsigned long long getDataByteSize() const override
nkImages::Image::isView
virtual bool isView() const override
nkImages::Image::getData
const nkMemory::Buffer & getData() const
nkImages::ImageBase
Base for all image data classes.
Definition: ImageBase.h:19
nkImages
Encompasses all API of component NilkinsImages.
Definition: BmpEncoder.h:7
nkImages::PIXEL_FORMAT
PIXEL_FORMAT
Lists formats for pixels.
Definition: PixelFormat.h:16
nkImages::Image::Image
Image() noexcept
nkImages::ImageDescriptor
Describes an image within an array. Used internally.
Definition: ImageDescriptor.h:12
nkImages::Image::getDataPtr
virtual unsigned char * getDataPtr() const override
nkImages::Image
Holds all information required for an image, with ownership over the data.
Definition: Image.h:14
nkMemory
Encompasses all API of component NilkinsMemory.
Definition: Allocator.h:7