33 #ifndef H_DC_DECODE_PNG
34 #define H_DC_DECODE_PNG
36 #include <Dynacoe/Decoders/Decoder.h>
41 class DecodePNG :
public Decoder{
43 DecodePNG() : Decoder(Assets::Type::Image, std::vector<std::string>{
"png"}){}
46 const std::string & name,
47 const std::string & extension,
48 const uint8_t * buffer,
66 struct UncompressedFrame {
70 struct UncompressedImage {
71 UncompressedFrame * frames;
78 void expandFromRGBtoRGBA(uint8_t *&,
int size) ;
79 void convertFromBGRAtoRGBA(uint8_t *&,
int size) ;
83 void disposeOf(UncompressedImage *& img);
86 void makeImage(UncompressedImage * src, Image *& out,
const std::string &);
91 void makeTileset(UncompressedImage *&,
int xDiv,
int yDiv);
95 void uncompressPNG(
const std::string &,
const uint8_t *, uint64_t, UncompressedImage *&);