20#ifndef YOURGAME_IMAGE_H
21#define YOURGAME_IMAGE_H
46 bool flipVertically =
false,
84 std::vector<uint8_t> m_data;
int getNumChannels() const
Definition image.cpp:185
static Image * fromMemoryEncoded(const uint8_t *data, size_t numBytes, bool flipVertically=false, Layout layoutDst=Layout::RGBA)
Definition image.cpp:29
Layout getLayout() const
Definition image.cpp:180
void premultiplyAlpha()
Definition image.cpp:126
static Image * fromMemoryRaw(const uint8_t *data, int width, int height, Layout layout=Layout::RGBA)
Definition image.cpp:67
int getWidth() const
Definition image.cpp:170
size_t getNumDemandedBytes() const
Definition image.cpp:190
int getHeight() const
Definition image.cpp:175
Image(Image const &)=delete
static Image * fromEmpty(int width, int height, Layout layout=Layout::RGBA)
Definition image.cpp:88
const uint8_t * getData() const
Definition image.cpp:165
static int getNumChannelsFromLayout(Layout layout)
Definition image.cpp:120
Layout
Definition image.h:35
void updateRaw(const uint8_t *data, int width, int height, Layout layout=Layout::RGBA)
Definition image.cpp:147
static std::array< int, 3 > decodeImageInfo(const uint8_t *data, size_t numBytes)
Definition image.cpp:108
Image & operator=(Image const &)=delete