mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-04 14:47:37 +03:00
25 lines
697 B
C++
25 lines
697 B
C++
#pragma once
|
|
#include <cstdint>
|
|
#include <memory>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#include "ImageToFramebufferDecoder.h"
|
|
|
|
class JpegToFramebufferConverter;
|
|
class PngToFramebufferConverter;
|
|
|
|
class ImageDecoderFactory {
|
|
public:
|
|
static void initialize();
|
|
// Returns non-owning pointer - factory owns the decoder lifetime
|
|
static ImageToFramebufferDecoder* getDecoder(const std::string& imagePath);
|
|
static bool isFormatSupported(const std::string& imagePath);
|
|
static std::vector<std::string> getSupportedFormats();
|
|
|
|
private:
|
|
static std::unique_ptr<JpegToFramebufferConverter> jpegDecoder;
|
|
static std::unique_ptr<PngToFramebufferConverter> pngDecoder;
|
|
static bool initialized;
|
|
};
|