2019-08-07 04:56:56 +02:00
|
|
|
// 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"
|
|
|
|
|
|
|
|
namespace Frontend {
|
|
|
|
|
|
|
|
class ImageInterface {
|
|
|
|
public:
|
2019-08-07 20:26:25 +02:00
|
|
|
virtual ~ImageInterface() = default;
|
2019-08-07 20:21:47 +02:00
|
|
|
|
2019-08-07 04:56:56 +02:00
|
|
|
// Error logging should be handled by the frontend
|
2019-08-07 20:26:25 +02:00
|
|
|
virtual bool DecodePNG(std::vector<u8>& dst, u32& width, u32& height,
|
|
|
|
const std::string& path) = 0;
|
2019-08-07 04:56:56 +02:00
|
|
|
virtual bool EncodePNG(const std::string& path, const std::vector<u8>& src, u32 width,
|
2019-08-07 20:26:25 +02:00
|
|
|
u32 height) = 0;
|
2019-08-07 04:56:56 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Frontend
|