mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-04 22:57:50 +03:00
19 lines
644 B
C++
19 lines
644 B
C++
#pragma once
|
|
|
|
#include <PNGdec.h>
|
|
|
|
#include "ImageToFramebufferDecoder.h"
|
|
|
|
class PngToFramebufferConverter final : public ImageToFramebufferDecoder {
|
|
public:
|
|
static bool getDimensionsStatic(const std::string& imagePath, ImageDimensions& out);
|
|
|
|
bool decodeToFramebuffer(const std::string& imagePath, GfxRenderer& renderer, const RenderConfig& config) override;
|
|
|
|
bool getDimensions(const std::string& imagePath, ImageDimensions& dims) const override {
|
|
return getDimensionsStatic(imagePath, dims);
|
|
}
|
|
|
|
bool supportsFormat(const std::string& extension) const override;
|
|
const char* getFormatName() const override { return "PNG"; }
|
|
}; |