mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Common: Add SavePNG() function that writes PNGs using the simplified libpng API.
This commit is contained in:
@ -4,6 +4,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
@ -12,4 +13,13 @@ namespace Common
|
||||
{
|
||||
bool LoadPNG(const std::vector<u8>& input, std::vector<u8>* data_out, u32* width_out,
|
||||
u32* height_out);
|
||||
}
|
||||
|
||||
enum class ImageByteFormat
|
||||
{
|
||||
RGB,
|
||||
RGBA,
|
||||
};
|
||||
|
||||
bool SavePNG(const std::string& path, const u8* input, ImageByteFormat format, u32 width,
|
||||
u32 height, int stride = 0);
|
||||
} // namespace Common
|
||||
|
Reference in New Issue
Block a user