nw::Image
-
struct Image
-
Read/Write Support:
jpg, png, dds, tga (thanks to stb_image and SOIL)
Bioware dds (thanks to NWNExplorer)
Note
Even though this supports writing images, this is catagorically not a tool for converting/compressing textures.
Public Functions
-
Image() = default
-
explicit Image(const std::filesystem::path &filename)
-
explicit Image(ResourceData data)
-
~Image()
-
uint32_t channels() const noexcept
Get BBP.
-
uint8_t *data() const noexcept
Get raw data.
-
uint32_t height() const noexcept
Get height.
-
bool is_bio_dds() const noexcept
Returns true if image was loaded from a bioware dds file.
-
uint8_t *release()
Releases the underlying array of bytes.
-
bool valid() const
Determine if successfully loaded.
-
uint32_t width() const noexcept
Get width.