implement getting image size without reading the whole image
This commit is contained in:
@@ -60,4 +60,10 @@ namespace OpenVulkano::Image
|
||||
stbi_image_free(pixelData);
|
||||
return std::make_unique<Image>(std::move(result));
|
||||
}
|
||||
|
||||
bool IImageLoader::GetDimensionsInternal(const std::string& filename, int& width, int& height)
|
||||
{
|
||||
int channels;
|
||||
return stbi_info(filename.c_str(), &width, &height, &channels);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user