no message

This commit is contained in:
DESKTOP-P4IRLQG\mkazh
2018-04-14 23:00:29 -04:00
parent 16375a7892
commit 514b259540
190 changed files with 84512 additions and 16888 deletions
+39
View File
@@ -0,0 +1,39 @@
#ifndef PNG_INCLUDED
#define PNG_INCLUDED
#ifdef _WIN32
#include "PNG/png.h"
#else // !_WIN32
#include <png.h>
#endif // _WIN32
struct PNGReader : public ImageReader
{
PNGReader( const char* fileName , unsigned int& width , unsigned int& height , unsigned int& channels );
~PNGReader( void );
unsigned int nextRow( unsigned char* row );
static bool GetInfo( const char* fileName , unsigned int& width , unsigned int& height , unsigned int& channels );
protected:
png_structp _png_ptr;
png_infop _info_ptr;
png_infop _end_info ;
FILE* _fp;
unsigned char* _scratchRow;
unsigned int _currentRow;
};
struct PNGWriter : public ImageWriter
{
PNGWriter( const char* fileName , unsigned int width , unsigned int height , unsigned int channels , unsigned int quality=100 );
~PNGWriter( void );
unsigned int nextRow( const unsigned char* row );
unsigned int nextRows( const unsigned char* rows , unsigned int rowNum );
protected:
FILE* _fp;
png_structp _png_ptr;
png_infop _info_ptr;
unsigned int _currentRow;
};
#include "PNG.inl"
#endif //PNG_INCLUDED