implement getting image size without reading the whole image
This commit is contained in:
@@ -21,5 +21,8 @@ namespace OpenVulkano::Image
|
||||
static std::unique_ptr<Image> loadData(const uint8_t* data, int size, int desiredChannels = 0);
|
||||
virtual std::unique_ptr<Image> loadFromFile(const std::string& filePath) = 0;
|
||||
virtual std::unique_ptr<Image> loadFromMemory(const std::vector<uint8_t>& buffer) = 0;
|
||||
virtual bool GetImageDimensions(const std::string& filename, int& width, int& height) = 0;
|
||||
protected:
|
||||
static bool GetDimensionsInternal(const std::string& filename, int& width, int& height);
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user