implement getting image size without reading the whole image

This commit is contained in:
ohyzha
2024-10-07 17:18:30 +03:00
parent c00e8a69e2
commit a4e716006a
6 changed files with 42 additions and 1 deletions

View File

@@ -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);
}
}