#ifndef _MX_PNG_H_ #define _MX_PNG_H_ #include #include #include "SDL.h" #include "mx_types.h" namespace mx { class mxPng : public mxObject { public: mxPng(); mxPng(std::string fname); int pngOpen(std::string fname); int pngClose(); SDL_Surface *LoadPNG(); protected: int x, y; int width, height; png_byte color_type; png_byte bit_depth; png_structp png_ptr; png_infop info_ptr; int number_of_passes; png_bytep * row_pointers; }; } #endif