mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-25 02:56:56 +01:00
28 lines
846 B
C++
28 lines
846 B
C++
|
// Copyright 2019 Citra Emulator Project
|
||
|
// Licensed under GPLv2 or any later version
|
||
|
// Refer to the license.txt file included.
|
||
|
|
||
|
#pragma once
|
||
|
|
||
|
#include <string>
|
||
|
#include <vector>
|
||
|
#include "common/common_types.h"
|
||
|
#include "common/logging/log.h"
|
||
|
|
||
|
namespace Frontend {
|
||
|
|
||
|
class ImageInterface {
|
||
|
public:
|
||
|
// Error logging should be handled by the frontend
|
||
|
virtual bool DecodePNG(std::vector<u8>& dst, u32& width, u32& height, const std::string& path) {
|
||
|
LOG_CRITICAL(Frontend, "Attempted to decode PNG without an image interface!");
|
||
|
return false;
|
||
|
};
|
||
|
virtual bool EncodePNG(const std::string& path, const std::vector<u8>& src, u32 width,
|
||
|
u32 height) {
|
||
|
LOG_CRITICAL(Frontend, "Attempted to encode PNG without an image interface!");
|
||
|
return false;
|
||
|
};
|
||
|
};
|
||
|
|
||
|
} // namespace Frontend
|