Files
rgbds/include/gfx/png.hpp
T
Rangi c0a16e4bad Move File-opening of PNG image into Png constructor (#2161)
Also rename `File::c_str` to `display_name` for clarity
2026-09-27 13:19:05 -04:00

29 lines
525 B
C++

// SPDX-License-Identifier: MIT
#ifndef RGBDS_GFX_PNG_HPP
#define RGBDS_GFX_PNG_HPP
#include <stdint.h>
#include <streambuf>
#include <string>
#include <vector>
#include "gfx/rgba.hpp"
struct Png {
uint32_t width = 0;
uint32_t height = 0;
std::vector<Rgba> pixels{};
std::vector<Rgba> palette{};
bool isIndexed = false;
Png() {}
Png(std::string const &path);
Png(char const *filename, std::streambuf &file);
private:
void initialize(char const *filename, std::streambuf &file);
};
#endif // RGBDS_GFX_PNG_HPP