mirror of
https://github.com/XLabsProject/s1x-client.git
synced 2023-08-02 15:02:12 +02:00
Handle channel conversion
This commit is contained in:
parent
f9ea94773e
commit
02bdf573d6
@ -20,12 +20,7 @@ namespace utils
|
||||
stbi_image_free(rgb_image);
|
||||
});
|
||||
|
||||
if(channels != 4)
|
||||
{
|
||||
throw std::runtime_error("Invalid channel count");
|
||||
}
|
||||
|
||||
const auto size = this->width * this->height * channels;
|
||||
const auto size = this->width * this->height * 4;
|
||||
this->data.resize(size);
|
||||
|
||||
std::memmove(this->data.data(), rgb_image, size);
|
||||
|
Loading…
Reference in New Issue
Block a user