mirror of
https://github.com/lltcggie/waifu2x-caffe.git
synced 2025-06-26 13:42:48 +00:00
stbで読み込む画像がおかしくなることがあるのを修正
This commit is contained in:
parent
d348cc9f37
commit
f63016d47f
@ -556,7 +556,7 @@ Waifu2x::eWaifu2xError Waifu2x::LoadMat(cv::Mat &float_image, const boost::files
|
||||
Waifu2x::eWaifu2xError Waifu2x::LoadMatBySTBI(cv::Mat &float_image, const std::vector<char> &img_data)
|
||||
{
|
||||
int x, y, comp;
|
||||
stbi_uc *data = stbi_load_from_memory((const stbi_uc *)img_data.data(), img_data.size(), &x, &y, &comp, 4);
|
||||
stbi_uc *data = stbi_load_from_memory((const stbi_uc *)img_data.data(), img_data.size(), &x, &y, &comp, 0);
|
||||
if (!data)
|
||||
return eWaifu2xError_FailedOpenInputFile;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user