27 lines
673 B
C++
27 lines
673 B
C++
#pragma once
|
|||
|
|
|
||
|
|
#include <pdfengine/image_object.hpp>
|
||
|
|
#include <pdfengine/image_descriptor.hpp>
|
||
|
|
#include <pdfengine/image_cache.hpp>
|
||
|
|
#include <memory>
|
||
|
|
#include <string>
|
||
|
|
|
||
|
|
namespace pdfengine {
|
||
|
|
|
||
|
|
class ImageManager {
|
||
|
|
public:
|
||
|
|
static ImageManager& instance();
|
||
|
|
|
||
|
|
std::shared_ptr<const ImageObject> processImageDescriptor(const ResolvedImageDescriptor& descriptor,
|
||
|
|
std::string* outError = nullptr);
|
||
|
|
|
||
|
|
void setCache(std::shared_ptr<IImageCache> cache);
|
||
|
|
std::shared_ptr<IImageCache> cache() const;
|
||
|
|
|
||
|
|
private:
|
||
|
|
ImageManager() = default;
|
||
|
|
std::shared_ptr<IImageCache> m_cache;
|
||
|
|
};
|
||
|
|
|
||
|
|
} // namespace pdfengine
|