add Slice9 type

This commit is contained in:
Omar Mohamed Ali Mudhir
2017-01-16 14:42:22 +00:00
parent 8c217af051
commit d5fed78bf5
7 changed files with 135 additions and 70 deletions

View File

@@ -7,7 +7,8 @@
bool Image::load(std::string filename)
{
stbi_set_flip_vertically_on_load(true);
uint8_t* buffer = stbi_load(filename.c_str(), &width, &height, &comp, 0);
uint8_t* buffer = stbi_load(filename.c_str(), &width, &height, nullptr, 4);
comp = 4;
m_data = std::unique_ptr<uint8_t[]>(buffer);
return true;
}