2 * psychlops_g_PNG_bridge.h
3 * Psychlops Standard Library (Universal)
5 * Last Modified 2006/08/22 by Kenchi HOSOKAWA
6 * (C) 2006- Kenchi HOSOKAWA, Kazushi MARUYA and Takao SATO
9 #ifndef HEADER_PSYCHLOPS_IMAGE_FORMATS_PNG
10 #define HEADER_PSYCHLOPS_IMAGE_FORMATS_PNG
20 #include "../../../core/graphic/psychlops_g_image.h"
24 namespace IMAGE_FORMATS {
27 const unsigned int PNG_BYTES_TO_CHECK = 4;
28 class PNG_BRIDGE : public IMAGE_FORMAT {
35 png_infop info_ptr, end_info_ptr;
42 virtual ~PNG_BRIDGE();
43 virtual void load(const char *file_name, Image * target);
44 virtual void save(const char *file_name, Image * target);
47 void open(const char *file_name, const char *mode);
49 void check_before_read();
50 void read(Image * target);
51 void prepare_before_write();
52 void write(Image * target);