Moved header structs and some methods to cpp files, reading pnm images upside-down

This commit is contained in:
Vladyslav Baranovskyi
2025-01-04 14:27:28 +02:00
parent 7ea6edf5d0
commit 295468358f
5 changed files with 179 additions and 149 deletions

View File

@@ -12,20 +12,9 @@ namespace OpenVulkano::Image
{
class ImageLoaderPfm : public IImageLoader
{
struct PfmImageHeader
{
int width;
int height;
bool isColor;
bool isLittleEndian;
};
public:
std::unique_ptr<Image> loadFromFile(const std::string& filePath) override;
std::unique_ptr<Image> loadFromMemory(const std::vector<uint8_t>& buffer) override;
Math::Vector2i GetImageDimensions(const std::string& filename) override;
private:
PfmImageHeader parseHeader(std::istringstream& stream);
};
}