change signature
This commit is contained in:
@@ -61,9 +61,15 @@ namespace OpenVulkano::Image
|
||||
return std::make_unique<Image>(std::move(result));
|
||||
}
|
||||
|
||||
bool IImageLoader::GetDimensionsInternal(const std::string& filename, int& width, int& height)
|
||||
Math::Vector2i IImageLoader::GetDimensionsInternal(const std::string& filename)
|
||||
{
|
||||
Math::Vector2i res = {};
|
||||
int channels;
|
||||
return stbi_info(filename.c_str(), &width, &height, &channels);
|
||||
if (!stbi_info(filename.c_str(), &res.x, &res.y, &channels))
|
||||
{
|
||||
Logger::FILESYS->error("Failed to read image header of file {}", filename);
|
||||
return Math::Vector2i{ -1, -1 };
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user